1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#26238 - inserted delayed always inserts 0 for BIT columns

INSERT DELAYED inserts garbage for BIT columns.

When delayed thread clones TABLE object, it didn't adjusted bit_ptr
to newly created record (though it correctly adjusts ptr and null_ptr).

This is fixed by correctly adjusting bit_ptr when performing a clone.
With this fix BIT values are stored correctly by INSERT DELAYED.
This commit is contained in:
svoj@mysql.com/june.mysql.com
2007-02-28 18:34:35 +04:00
parent 37cedb7efa
commit aae6e1aba4
3 changed files with 21 additions and 1 deletions

View File

@ -243,3 +243,10 @@ SET @@session.auto_increment_offset=
@bug20830_old_session_auto_increment_offset;
SET @@session.auto_increment_increment=
@bug20830_old_session_auto_increment_increment;
CREATE TABLE t1(a BIT);
INSERT DELAYED INTO t1 VALUES(1);
FLUSH TABLE t1;
SELECT HEX(a) FROM t1;
HEX(a)
1
DROP TABLE t1;

View File

@ -234,3 +234,11 @@ SET @@session.auto_increment_offset=
SET @@session.auto_increment_increment=
@bug20830_old_session_auto_increment_increment;
#
# BUG#26238 - inserted delayed always inserts 0 for BIT columns
#
CREATE TABLE t1(a BIT);
INSERT DELAYED INTO t1 VALUES(1);
FLUSH TABLE t1;
SELECT HEX(a) FROM t1;
DROP TABLE t1;