Commit 7b611b33 authored by patg@krsna.patg.net's avatar patg@krsna.patg.net

BUG #14532

Added FIELD_TYPE_BIT to field method 'needs_quotes' to make BIT columns
work.
parent 1137a376
......@@ -1490,6 +1490,59 @@ id name
DROP TABLE federated.alter_me;
DROP TABLE federated.normal_table;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`bitty` bit(3)
) DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`bitty` bit(3)
) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (b'001');
INSERT INTO federated.t1 VALUES (b'010');
INSERT INTO federated.t1 VALUES (b'011');
INSERT INTO federated.t1 VALUES (b'100');
INSERT INTO federated.t1 VALUES (b'101');
INSERT INTO federated.t1 VALUES (b'110');
INSERT INTO federated.t1 VALUES (b'111');
select * FROM federated.t1;
bitty







select * FROM federated.t1;
bitty







delete from federated.t1;
INSERT INTO federated.t1 VALUES (b'001');
INSERT INTO federated.t1 VALUES (b'010');
INSERT INTO federated.t1 VALUES (b'011');
INSERT INTO federated.t1 VALUES (b'100');
INSERT INTO federated.t1 VALUES (b'101');
INSERT INTO federated.t1 VALUES (b'110');
INSERT INTO federated.t1 VALUES (b'111');
select * FROM federated.t1;
bitty







drop table federated.t1;
drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
......@@ -1188,5 +1188,39 @@ connection slave;
DROP TABLE federated.normal_table;
# END ALTER TEST
#
# Test BUG #14532
#
--disable_warnings
DROP TABLE IF EXISTS federated.t1;
--enable_warnings
CREATE TABLE federated.t1 (
`bitty` bit(3)
) DEFAULT CHARSET=latin1;
connection master;
--disable_warnings
DROP TABLE IF EXISTS federated.t1;
--enable_warnings
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`bitty` bit(3)
) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 VALUES (b'001');
INSERT INTO federated.t1 VALUES (b'010');
INSERT INTO federated.t1 VALUES (b'011');
INSERT INTO federated.t1 VALUES (b'100');
INSERT INTO federated.t1 VALUES (b'101');
INSERT INTO federated.t1 VALUES (b'110');
INSERT INTO federated.t1 VALUES (b'111');
select * FROM federated.t1;
drop table federated.t1;
connection slave;
drop table federated.t1;
source include/federated_cleanup.inc;
......@@ -1628,6 +1628,7 @@ bool Field::needs_quotes(void)
case FIELD_TYPE_MEDIUM_BLOB :
case FIELD_TYPE_LONG_BLOB :
case FIELD_TYPE_GEOMETRY :
case FIELD_TYPE_BIT:
DBUG_RETURN(1);
case FIELD_TYPE_DECIMAL :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment