Menu

#2673 (ok 2.11.7) Binary not treated as blob: update/delete issues

2.11.5
fixed
1
2013-06-11
2008-04-07
No

CREATE TABLE IF NOT EXISTS `xf_email_verification` (
`email` varchar(255) NOT NULL,
`pass` binary(20) NOT NULL,
`ctime` int(11) NOT NULL,
UNIQUE KEY `pass` (`pass`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `xf_email_verification`
--

INSERT INTO `xf_email_verification` (`email`, `pass`, `ctime`) VALUES
('olaf@xwis.net', '��J����''u�-�a���q', 1207577470),
('olaf@xwis.net', '�.pm����t?�l�����', 1207577499);

When I try to edit one of these rows, PMA shows these errors:
MySQL returned an empty result set (i.e. zero rows).

Warning: mb_strpos() [function.mb-strpos]: Unknown encoding or conversion error. in C:\IS\Apache2.2\htdocs\phpMyAdmin\libraries\string_mb.lib.php on line 60

Warning: mb_strpos() [function.mb-strpos]: Unknown encoding or conversion error. in C:\IS\Apache2.2\htdocs\phpMyAdmin\libraries\string_mb.lib.php on line 60

Warning: mb_strpos() [function.mb-strpos]: Unknown encoding or conversion error. in C:\IS\Apache2.2\htdocs\phpMyAdmin\libraries\string_mb.lib.php on line 60

SELECT * FROM `xf3`.`xf_email_verification` WHERE CONVERT(`xf_email_verification`.`pass` USING utf8) = '��J����''u�-�a���q';

It might be a good idea to treat binary fields as blobs. ;)

Discussion

  • Marc Delisle

    Marc Delisle - 2008-04-08

    Logged In: YES
    user_id=210714
    Originator: NO

    Could you attach here a small file containing your INSERT statements, it would be helpful to work on this case.

    Also, what is the value of your $cfg['ProtectBinary'] parameter?

    I'm not sure if editing a binary field on a web interface is a good idea... This is why the default value of $cfg['ProtectBinary'] is 'all'. But phpMyAdmin should not try to do string conversion on a BINARY field because it does not have a charset.

     
  • Olaf van der Spek

    Logged In: YES
    user_id=30264
    Originator: YES

    > Could you attach here a small file containing your INSERT statements, it
    would be helpful to work on this case.

    Inserting unhex(sha1('1')) should do the trick.

    > Also, what is the value of your $cfg['ProtectBinary'] parameter?

    The default.

    > I'm not sure if editing a binary field on a web interface is a good
    idea... This is why the default value of $cfg['ProtectBinary'] is 'all'.
    But phpMyAdmin should not try to do string conversion on a BINARY field
    because it does not have a charset.

    Since it's used as the key, I can't even edit the other fields or delete the entire row.

     
  • Marc Delisle

    Marc Delisle - 2008-06-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-06-02
    • priority: 5 --> 1
    • summary: Binary not treated as blob: update/delete issues --> (ok 2.11.7) Binary not treated as blob: update/delete issues
    • status: open --> open-fixed
     
  • Olaf van der Spek

    Logged In: YES
    user_id=30264
    Originator: YES

    It appears to be fixed. Thanks.

     
  • Marc Delisle

    Marc Delisle - 2008-06-23
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed