From 92011ea43c502dae9f033cbc89455580466e6045 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 May 2012 10:29:53 +0300 Subject: Fix of LP bug#992380 + revise fix_fields about missing with_subselect collection The problem is that some fix_fields do not call Item_func::fix_fields and do not collect with subselect_information. --- mysql-test/t/func_test.test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/t/func_test.test') diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 77bf3be5e72..4cba29986a1 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -160,3 +160,23 @@ SELECT LEAST(1.1,1.2,NULL,1.0) FROM DUAL; SELECT GREATEST(1.5E+2,1.3E+2,NULL) FROM DUAL; # End of 4.1 tests + +# +# test of replacing NOT +# +create table t1 (a int); +insert into t1 values (1), (100), (0), (NULL); + +select not a from t1; +explain extended select not a from t1; + +select * from t1 where not a; +explain extended select * from t1 where not a; + +select not (a+0) from t1; +explain extended select not (a+0) from t1; + +select * from t1 where not (a+0); +explain extended select * from t1 where not (a+0); + +drop table t1; -- cgit v1.2.1