Bug #87257 | bit(1) values buffer overflow | ||
---|---|---|---|
Submitted: | 31 Jul 2017 8:27 | Modified: | 13 Sep 2017 17:33 |
Reporter: | Alessandro Cannini | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | Windows | |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[31 Jul 2017 8:27]
Alessandro Cannini
[31 Jul 2017 15:40]
MySQL Verification Team
Hi, This looks like phpmysql bug, not mysql bug. create table t (trt bit(1)); insert into t values (1); insert into t values (0); select hex(trt) from t; +----------+ | hex(trt) | +----------+ | 1 | | 0 | +----------+ everything as expected Can you confirm connecting directly to mysql that you have a problem or not? all best Bogdan
[3 Aug 2017 7:27]
Alessandro Cannini
You must use 32-bit mysql on 64-bit Windows. mysql -uroot -e"CREATE TABLE test1 (bit_column_1 bit(1) NOT NULL) DEFAULT CHARSET=utf8" test_db mysql -uroot -e"INSERT INTO test1 (bit_column_1) VALUES (0)" test_db mysql -uroot -e"INSERT INTO test1 (bit_column_1) VALUES (1)" test_db mysql -uroot -e"SELECT bit_column_1 FROM test1" test_db +--------------+ | bit_column_1 | +--------------+ | | | ☺ | +--------------+
[3 Aug 2017 7:33]
Alessandro Cannini
Ok, now I have used hex and it works, sorry for the bother. The bug is definitely not in mysql.
[13 Sep 2017 17:33]
Alessandro Cannini
The bug is this: https://bugs.php.net/bug.php?id=75018
[13 Sep 2017 21:13]
MySQL Verification Team
Thanks for the update :D all best Bogdan