Loading include/my_global.h +0 −2 Original line number Diff line number Diff line Loading @@ -274,10 +274,8 @@ C_MODE_START int __cxa_pure_virtual() {\ #include <alloca.h> #endif #ifdef HAVE_ATOMIC_ADD #if defined(__ia64__) #define new my_arg_new #define need_to_restore_new 1 #endif C_MODE_START #include <asm/atomic.h> C_MODE_END Loading mysql-test/mysql-test-run.pl +8 −8 Original line number Diff line number Diff line Loading @@ -303,7 +303,7 @@ sub mysqld_arguments ($$$$$); sub stop_masters_slaves (); sub stop_masters (); sub stop_slaves (); sub run_mysqltest ($$); sub run_mysqltest ($); sub usage ($); ###################################################################### Loading Loading @@ -1345,10 +1345,11 @@ sub run_testcase ($) { if ( ! $glob_use_running_server and ! $glob_use_embedded_server ) { if ( $tinfo->{'master_restart'} or $master->[0]->{'uses_special_flags'} ) if ( $tinfo->{'master_restart'} or $master->[0]->{'running_master_is_special'} ) { stop_masters(); $master->[0]->{'uses_special_flags'}= 0; # Forget about why we stopped $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped } # ---------------------------------------------------------------------- Loading Loading @@ -1426,9 +1427,9 @@ sub run_testcase ($) { } } if ( @{$tinfo->{'master_opt'}} ) if ( $tinfo->{'master_restart'} ) { $master->[0]->{'uses_special_flags'}= 1; $master->[0]->{'running_master_is_special'}= 1; } } Loading Loading @@ -1475,7 +1476,7 @@ sub run_testcase ($) { } unlink($path_timefile); my $res= run_mysqltest($tinfo, $tinfo->{'master_opt'}); my $res= run_mysqltest($tinfo); if ( $res == 0 ) { Loading Loading @@ -1975,9 +1976,8 @@ sub stop_slaves () { } sub run_mysqltest ($$) { sub run_mysqltest ($) { my $tinfo= shift; my $master_opts= shift; my $cmdline_mysqldump= "$exe_mysqldump --no-defaults -uroot " . "--socket=$master->[0]->{'path_mysock'} --password="; Loading mysql-test/r/func_time.result +15 −0 Original line number Diff line number Diff line Loading @@ -611,3 +611,18 @@ SELECT count(*) FROM t1 WHERE d>FROM_DAYS(TO_DAYS(@TMP)) AND d<=FROM_DAYS(TO_DAY count(*) 3 DROP TABLE t1; select last_day('2005-00-00'); last_day('2005-00-00') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-00-00' select last_day('2005-00-01'); last_day('2005-00-01') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-00-01' select last_day('2005-01-00'); last_day('2005-01-00') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-01-00' mysql-test/r/heap_hash.result +12 −11 Original line number Diff line number Diff line Loading @@ -231,18 +231,19 @@ explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where insert into t1 select * from t1; flush tables; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where flush tables; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra Loading @@ -261,16 +262,16 @@ delete from t1; insert into t1 select * from t2; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where drop table t1, t2; create table t1 ( id int unsigned not null primary key auto_increment, Loading Loading @@ -345,15 +346,15 @@ insert into t3 select name, name from t1; show index from t3; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t3 1 a 1 a NULL NULL NULL NULL HASH t3 1 a 2 b NULL 15 NULL NULL HASH t3 1 a 2 b NULL 13 NULL NULL HASH show index from t3; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t3 1 a 1 a NULL NULL NULL NULL HASH t3 1 a 2 b NULL 15 NULL NULL HASH t3 1 a 2 b NULL 13 NULL NULL HASH explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where 1 SIMPLE t3 ref a a 40 func,const 6 Using where 1 SIMPLE t3 ref a a 40 func,const 7 Using where drop table t1, t2, t3; create temporary table t1 ( a int, index (a) ) engine=memory; insert into t1 values (1),(2),(3),(4),(5); Loading mysql-test/r/range.result +32 −1 Original line number Diff line number Diff line Loading @@ -556,11 +556,42 @@ count(*) 0 select count(*) from t1 where x > -16; count(*) 1 2 select count(*) from t1 where x = 18446744073709551601; count(*) 1 drop table t1; create table t1 (a bigint unsigned); create index t1i on t1(a); insert into t1 select 18446744073709551615; insert into t1 select 18446744073709551614; explain select * from t1 where a <> -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a <> -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a > -1 or a < -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a > -1 or a < -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a > -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a > -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a < -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables select * from t1 where a < -1; a drop table t1; set names latin1; create table t1 (a char(10), b text, key (a)) character set latin1; INSERT INTO t1 (a) VALUES Loading Loading
include/my_global.h +0 −2 Original line number Diff line number Diff line Loading @@ -274,10 +274,8 @@ C_MODE_START int __cxa_pure_virtual() {\ #include <alloca.h> #endif #ifdef HAVE_ATOMIC_ADD #if defined(__ia64__) #define new my_arg_new #define need_to_restore_new 1 #endif C_MODE_START #include <asm/atomic.h> C_MODE_END Loading
mysql-test/mysql-test-run.pl +8 −8 Original line number Diff line number Diff line Loading @@ -303,7 +303,7 @@ sub mysqld_arguments ($$$$$); sub stop_masters_slaves (); sub stop_masters (); sub stop_slaves (); sub run_mysqltest ($$); sub run_mysqltest ($); sub usage ($); ###################################################################### Loading Loading @@ -1345,10 +1345,11 @@ sub run_testcase ($) { if ( ! $glob_use_running_server and ! $glob_use_embedded_server ) { if ( $tinfo->{'master_restart'} or $master->[0]->{'uses_special_flags'} ) if ( $tinfo->{'master_restart'} or $master->[0]->{'running_master_is_special'} ) { stop_masters(); $master->[0]->{'uses_special_flags'}= 0; # Forget about why we stopped $master->[0]->{'running_master_is_special'}= 0; # Forget why we stopped } # ---------------------------------------------------------------------- Loading Loading @@ -1426,9 +1427,9 @@ sub run_testcase ($) { } } if ( @{$tinfo->{'master_opt'}} ) if ( $tinfo->{'master_restart'} ) { $master->[0]->{'uses_special_flags'}= 1; $master->[0]->{'running_master_is_special'}= 1; } } Loading Loading @@ -1475,7 +1476,7 @@ sub run_testcase ($) { } unlink($path_timefile); my $res= run_mysqltest($tinfo, $tinfo->{'master_opt'}); my $res= run_mysqltest($tinfo); if ( $res == 0 ) { Loading Loading @@ -1975,9 +1976,8 @@ sub stop_slaves () { } sub run_mysqltest ($$) { sub run_mysqltest ($) { my $tinfo= shift; my $master_opts= shift; my $cmdline_mysqldump= "$exe_mysqldump --no-defaults -uroot " . "--socket=$master->[0]->{'path_mysock'} --password="; Loading
mysql-test/r/func_time.result +15 −0 Original line number Diff line number Diff line Loading @@ -611,3 +611,18 @@ SELECT count(*) FROM t1 WHERE d>FROM_DAYS(TO_DAYS(@TMP)) AND d<=FROM_DAYS(TO_DAY count(*) 3 DROP TABLE t1; select last_day('2005-00-00'); last_day('2005-00-00') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-00-00' select last_day('2005-00-01'); last_day('2005-00-01') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-00-01' select last_day('2005-01-00'); last_day('2005-01-00') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-01-00'
mysql-test/r/heap_hash.result +12 −11 Original line number Diff line number Diff line Loading @@ -231,18 +231,19 @@ explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where insert into t1 select * from t1; flush tables; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where flush tables; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra Loading @@ -261,16 +262,16 @@ delete from t1; insert into t1 select * from t2; explain select * from t1 where a='aaaa'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a a 8 const 1 Using where 1 SIMPLE t1 ref a a 8 const 2 Using where drop table t1, t2; create table t1 ( id int unsigned not null primary key auto_increment, Loading Loading @@ -345,15 +346,15 @@ insert into t3 select name, name from t1; show index from t3; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t3 1 a 1 a NULL NULL NULL NULL HASH t3 1 a 2 b NULL 15 NULL NULL HASH t3 1 a 2 b NULL 13 NULL NULL HASH show index from t3; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t3 1 a 1 a NULL NULL NULL NULL HASH t3 1 a 2 b NULL 15 NULL NULL HASH t3 1 a 2 b NULL 13 NULL NULL HASH explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where 1 SIMPLE t3 ref a a 40 func,const 6 Using where 1 SIMPLE t3 ref a a 40 func,const 7 Using where drop table t1, t2, t3; create temporary table t1 ( a int, index (a) ) engine=memory; insert into t1 values (1),(2),(3),(4),(5); Loading
mysql-test/r/range.result +32 −1 Original line number Diff line number Diff line Loading @@ -556,11 +556,42 @@ count(*) 0 select count(*) from t1 where x > -16; count(*) 1 2 select count(*) from t1 where x = 18446744073709551601; count(*) 1 drop table t1; create table t1 (a bigint unsigned); create index t1i on t1(a); insert into t1 select 18446744073709551615; insert into t1 select 18446744073709551614; explain select * from t1 where a <> -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a <> -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a > -1 or a < -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a > -1 or a < -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a > -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index select * from t1 where a > -1; a 18446744073709551614 18446744073709551615 explain select * from t1 where a < -1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables select * from t1 where a < -1; a drop table t1; set names latin1; create table t1 (a char(10), b text, key (a)) character set latin1; INSERT INTO t1 (a) VALUES Loading