Loading BUILD/check-cpu +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,10 @@ check_cpu () { *i386*i486*) cpu_arg="pentium-m"; ;; #Core 2 Duo *Intel*Core\(TM\)2*) cpu_arg="nocona"; ;; # Intel ia64 *Itanium*) Loading mysql-test/r/explain.result +30 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,33 @@ select 3 into @v1; explain select 3 into @v1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used create table t1(f1 int, f2 int); insert into t1 values (1,1); create view v1 as select * from t1 where f1=1; explain extended select * from v1 where f2=1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 1 explain extended select * from t1 where 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 0 explain extended select * from t1 where 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 1 explain extended select * from t1 having 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` having 0 explain extended select * from t1 having 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` having 1 drop view v1; drop table t1; mysql-test/r/func_in.result +78 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,84 @@ WHERE t3.a=t1.a AND t3.a=t2.a; 3 3 DROP TABLE t1,t2,t3,t4; CREATE TABLE t1(a BIGINT UNSIGNED); INSERT INTO t1 VALUES (0xFFFFFFFFFFFFFFFF); SELECT * FROM t1 WHERE a=-1 OR a=-2 ; a SELECT * FROM t1 WHERE a IN (-1, -2); a CREATE TABLE t2 (a BIGINT UNSIGNED); insert into t2 values(13491727406643098568), (0x7fffffefffffffff), (0x7ffffffeffffffff), (0x7fffffffefffffff), (0x7ffffffffeffffff), (0x7fffffffffefffff), (0x7ffffffffffeffff), (0x7fffffffffffefff), (0x7ffffffffffffeff), (0x7fffffffffffffef), (0x7ffffffffffffffe), (0x7fffffffffffffff), (0x8000000000000000), (0x8000000000000001), (0x8000000000000002), (0x8000000000000300), (0x8000000000000400), (0x8000000000000401), (0x8000000000004001), (0x8000000000040001), (0x8000000000400001), (0x8000000004000001), (0x8000000040000001), (0x8000000400000001), (0x8000004000000001), (0x8000040000000001); SELECT HEX(a) FROM t2 WHERE a IN (0xBB3C3E98175D33C8, 42); HEX(a) BB3C3E98175D33C8 SELECT HEX(a) FROM t2 WHERE a IN (0xBB3C3E98175D33C8, 0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000400, 0x8000000000000401, 42); HEX(a) BB3C3E98175D33C8 7FFFFFFFFFFFFEFF 7FFFFFFFFFFFFFEF 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF 8000000000000000 8000000000000001 8000000000000002 8000000000000300 8000000000000400 8000000000000401 SELECT HEX(a) FROM t2 WHERE a IN (0x7fffffffffffffff,0x8000000000000001); HEX(a) 7FFFFFFFFFFFFFFF 8000000000000001 SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff,'abc'); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF CREATE TABLE t3 (a BIGINT UNSIGNED); INSERT INTO t3 VALUES (9223372036854775551); SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42); HEX(a) CREATE TABLE t4 (a DATE); INSERT INTO t4 VALUES ('1972-02-06'), ('1972-07-29'); SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29'); a Warnings: Warning 1292 Incorrect date value: '19772-07-29' for column 'a' at row 1 DROP TABLE t1,t2,t3,t4; End of 5.0 tests create table t1(f1 char(1)); insert into t1 values ('a'),('b'),('1'); Loading mysql-test/r/func_str.result +6 −0 Original line number Diff line number Diff line Loading @@ -2287,4 +2287,10 @@ A B tire # # 1 ## ## 2 DROP TABLE t1; SELECT UNHEX('G'); UNHEX('G') NULL SELECT UNHEX('G') IS NULL; UNHEX('G') IS NULL 1 End of 5.0 tests mysql-test/r/func_test.result +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ explain extended select * from t1 where 1 xor 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 select - a from t1; - a -1 Loading Loading
BUILD/check-cpu +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,10 @@ check_cpu () { *i386*i486*) cpu_arg="pentium-m"; ;; #Core 2 Duo *Intel*Core\(TM\)2*) cpu_arg="nocona"; ;; # Intel ia64 *Itanium*) Loading
mysql-test/r/explain.result +30 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,33 @@ select 3 into @v1; explain select 3 into @v1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used create table t1(f1 int, f2 int); insert into t1 values (1,1); create view v1 as select * from t1 where f1=1; explain extended select * from v1 where f2=1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 1 explain extended select * from t1 where 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 0 explain extended select * from t1 where 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` where 1 explain extended select * from t1 having 0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` having 0 explain extended select * from t1 having 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 Warnings: Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f2` AS `f2` from `test`.`t1` having 1 drop view v1; drop table t1;
mysql-test/r/func_in.result +78 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,84 @@ WHERE t3.a=t1.a AND t3.a=t2.a; 3 3 DROP TABLE t1,t2,t3,t4; CREATE TABLE t1(a BIGINT UNSIGNED); INSERT INTO t1 VALUES (0xFFFFFFFFFFFFFFFF); SELECT * FROM t1 WHERE a=-1 OR a=-2 ; a SELECT * FROM t1 WHERE a IN (-1, -2); a CREATE TABLE t2 (a BIGINT UNSIGNED); insert into t2 values(13491727406643098568), (0x7fffffefffffffff), (0x7ffffffeffffffff), (0x7fffffffefffffff), (0x7ffffffffeffffff), (0x7fffffffffefffff), (0x7ffffffffffeffff), (0x7fffffffffffefff), (0x7ffffffffffffeff), (0x7fffffffffffffef), (0x7ffffffffffffffe), (0x7fffffffffffffff), (0x8000000000000000), (0x8000000000000001), (0x8000000000000002), (0x8000000000000300), (0x8000000000000400), (0x8000000000000401), (0x8000000000004001), (0x8000000000040001), (0x8000000000400001), (0x8000000004000001), (0x8000000040000001), (0x8000000400000001), (0x8000004000000001), (0x8000040000000001); SELECT HEX(a) FROM t2 WHERE a IN (0xBB3C3E98175D33C8, 42); HEX(a) BB3C3E98175D33C8 SELECT HEX(a) FROM t2 WHERE a IN (0xBB3C3E98175D33C8, 0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000400, 0x8000000000000401, 42); HEX(a) BB3C3E98175D33C8 7FFFFFFFFFFFFEFF 7FFFFFFFFFFFFFEF 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF 8000000000000000 8000000000000001 8000000000000002 8000000000000300 8000000000000400 8000000000000401 SELECT HEX(a) FROM t2 WHERE a IN (0x7fffffffffffffff,0x8000000000000001); HEX(a) 7FFFFFFFFFFFFFFF 8000000000000001 SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff,'abc'); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF CREATE TABLE t3 (a BIGINT UNSIGNED); INSERT INTO t3 VALUES (9223372036854775551); SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42); HEX(a) CREATE TABLE t4 (a DATE); INSERT INTO t4 VALUES ('1972-02-06'), ('1972-07-29'); SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29'); a Warnings: Warning 1292 Incorrect date value: '19772-07-29' for column 'a' at row 1 DROP TABLE t1,t2,t3,t4; End of 5.0 tests create table t1(f1 char(1)); insert into t1 values ('a'),('b'),('1'); Loading
mysql-test/r/func_str.result +6 −0 Original line number Diff line number Diff line Loading @@ -2287,4 +2287,10 @@ A B tire # # 1 ## ## 2 DROP TABLE t1; SELECT UNHEX('G'); UNHEX('G') NULL SELECT UNHEX('G') IS NULL; UNHEX('G') IS NULL 1 End of 5.0 tests
mysql-test/r/func_test.result +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ explain extended select * from t1 where 1 xor 1; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 select - a from t1; - a -1 Loading