summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-08-05 11:47:58 +0200
committerSergei Golubchik <sergii@pisem.net>2014-08-05 11:47:58 +0200
commitcf4814b39700fc0fe062519ad9090099540f79c0 (patch)
tree574b3446945a889c530e310150d81d404324e88d /mysql-test/r
parent321f589c81105ef9fc23689b7ec8eec3ff98ed39 (diff)
downloadmariadb-git-cf4814b39700fc0fe062519ad9090099540f79c0.tar.gz
MDEV-6052 Inconsistent results with bit type
Remove the "don't update the row for b'' and store uninitialized bytes on disk" change. Update test cases to allow DEFAULT b'', because b'' is a valid expression elsewhere.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/type_bit.result7
-rw-r--r--mysql-test/r/type_bit_innodb.result9
2 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index e6f4db26c23..639a97be27b 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -722,7 +722,12 @@ DROP TABLE t1;
CREATE TABLE IF NOT EXISTS t1 (
f1 bit(2) NOT NULL default b''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
-ERROR 42000: Invalid default value for 'f1'
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` bit(2) NOT NULL DEFAULT b'0'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
+DROP TABLE t1;
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
create table t2bit7 (b1 bit(7)) engine=MyISAM;
insert into t1bit7 values (b'1100000');
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 9bdd8658690..80fc942e77c 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -413,3 +413,12 @@ a
`
drop table t1;
End of 5.0 tests
+create table t1(f1 bit(2) not null default b'10',f2 bit(14) not null default b'11110000111100');
+insert into t1 (f1) values (default);
+insert into t1 values (b'',b''),('','');
+select hex(f1), hex(f2) from t1;
+hex(f1) hex(f2)
+2 3C3C
+0 0
+0 0
+drop table t1;