MySQL: create table bit_test ( my_column BIT );
Values of my_column must be wrapped in quotes otherwise MySQL rejects the resulting dump with a syntax error message. Compare dump made with mysqldump and Adminer.
What's the MySQL version? What's the error message? I removed the quotes by purpose: https://github.com/vrana/adminer/commit/41e197ac0673c0e617d2ecd48e25a00271f4b5e4
mysql.exe Ver 14.14 Distrib 5.5.20, for Win64 (x86)
ERROR 1064 (42000) at line 4: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
I don't suppose you'll see the bit here correctly, have a look at the file I uploaded.
MySQL error message
It seems that MySQLnd returns the bit value as a number but libmysql returns it as a binary string.
Sorry, I lost you. The dump was created with Adminer, not mysqldump. Or did you mean something else?
The error message was from when I was trying to import it with mysql.exe. The same message however, I get when trying to import it with Adminer (the same MySQL server).
Do you need some additional info from me?
Oh, when I dump the same table with mysqldump.exe, I don't get escaped chars like \0 or x0 but the same single bit character wrapped in apostrophes.
I don't mean mysqldump, I mean http://php.net/mysqlnd.
I'd just like to note that the bug is still present in Adminer 3.6.1.
Works for me in different PHP and MySQL versions.
Thank you for the report, I've fixed it in Git. You can download the "Current development version" from http://www.adminer.org/#download
Log in to post a comment.