summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-03-04 18:03:11 +0100
committerunknown <serg@serg.mysql.com>2003-03-04 18:03:11 +0100
commit7f950027ce0e62edd423908c869e7d18456cc772 (patch)
tree5cb1cc194332d930b6c506a925e883115160af0d /mysql-test
parent5603e43291b9e82037e345edae7f8036f92ebcae (diff)
parent9c40c7e94760400774cb82abd9faaa8d2f657a07 (diff)
downloadmariadb-git-7f950027ce0e62edd423908c869e7d18456cc772.tar.gz
Merge work:/home/bk/mysql into serg.mysql.com:/usr/home/serg/Abk/mysql
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/delete.result4
-rw-r--r--mysql-test/t/delete.test20
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
new file mode 100644
index 00000000000..169232b72d8
--- /dev/null
+++ b/mysql-test/r/delete.result
@@ -0,0 +1,4 @@
+bool not_null misc
+NULL c 6
+NULL d 7
+bool not_null misc
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 953e22cdd55..13fa617b3cf 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -35,3 +35,23 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
delete from t1 where a=27;
drop table t1;
+
+#
+# CHAR(0) bug - not actually DELETE bug, but anyway...
+#
+
+CREATE TABLE t1 (
+ bool char(0) default NULL,
+ not_null varchar(20) binary NOT NULL default '',
+ misc integer not null,
+ PRIMARY KEY (not_null)
+) TYPE=MyISAM;
+
+INSERT INTO t1 VALUES (NULL,'a',4), (NULL,'b',5), (NULL,'c',6), (NULL,'d',7);
+
+select * from t1 where misc > 5 and bool is null;
+delete from t1 where misc > 5 and bool is null;
+select * from t1 where misc > 5 and bool is null;
+
+drop table t1;
+