diff options
Diffstat (limited to 'mysql-test/t/delete.test')
-rw-r--r-- | mysql-test/t/delete.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 57321739bfb..af047db04bd 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -46,3 +46,22 @@ CREATE TABLE `t` ( -- error 1054 DELETE FROM t USING t WHERE post='1'; drop table if exists t; + +# +# 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; |