summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-02-24 14:37:00 +0100
committerSergei Golubchik <sergii@pisem.net>2012-02-24 14:37:00 +0100
commit3f28115e0ee810de2772fdc69d6965058a0b5d2f (patch)
treea14bb01c316d353c5b6c217b7198cf4148ae50e5 /mysql-test
parentdb39910f080534159ce8c7d55fa458365de7c3f3 (diff)
parentc068b831aca6334c6dea01fd9ff54b6140a52ef6 (diff)
downloadmariadb-git-3f28115e0ee810de2772fdc69d6965058a0b5d2f.tar.gz
5.3 merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/icp_tests.inc6
-rwxr-xr-xmysql-test/mysql-test-run.pl5
-rw-r--r--mysql-test/r/innodb_icp.result18
-rw-r--r--mysql-test/r/join_cache.result24
-rw-r--r--mysql-test/r/lock_multi.result1
-rw-r--r--mysql-test/r/maria_icp.result18
-rw-r--r--mysql-test/r/myisam_icp.result33
-rw-r--r--mysql-test/r/myisam_icp_notembedded.result19
-rw-r--r--mysql-test/r/myisam_mrr.result15
-rw-r--r--mysql-test/r/status.result16
-rw-r--r--mysql-test/r/status_user.result7
-rw-r--r--mysql-test/r/type_timestamp.result13
-rw-r--r--mysql-test/t/join_cache.test8
-rw-r--r--mysql-test/t/lock_multi.test1
-rw-r--r--mysql-test/t/myisam_icp.test128
-rw-r--r--mysql-test/t/myisam_icp_notembedded.test139
-rw-r--r--mysql-test/t/myisam_mrr.test1
-rw-r--r--mysql-test/t/type_timestamp.test7
18 files changed, 259 insertions, 200 deletions
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index f412843ded0..e84b8622cdb 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -862,15 +862,15 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
DROP TABLE t1;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 930ca46a7c7..7c872875bc9 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2748,7 +2748,8 @@ sub setup_vardir() {
{
$plugindir= $mysqld_variables{'plugin-dir'} || '.';
# hm, what paths work for debs and for rpms ?
- for (<$bindir/lib/mysql/plugin/*.so>,
+ for (<$bindir/lib64/mysql/plugin/*.so>,
+ <$bindir/lib/mysql/plugin/*.so>,
<$bindir/lib/plugin/*.dll>)
{
my $pname=basename($_);
@@ -4785,7 +4786,7 @@ sub extract_warning_lines ($$) {
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
qr|Checking table: '\..mtr.test_suppressions'|,
qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|,
- qr|mysqld: Table '\..mtr.test_suppressions' is marked as crashed and should be repaired|,
+ qr|Table '\..mtr.test_suppressions' is marked as crashed and should be repaired|,
qr|Can't open shared library.*ha_archive|,
qr|InnoDB: Error: table 'test/bug39438'|,
qr| entry '.*' ignored in --skip-name-resolve mode|,
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index a5029d7508a..5b4b09df1fe 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -816,24 +816,24 @@ KEY (c1)
);
INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
+Handler_icp_attempts 0
+Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
DROP TABLE t1;
#
# BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index db9a3b7090e..9c85fb2516a 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -3520,10 +3520,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 20
-Handler_pushed_index_cond_filtered 16
+Handler_icp_attempts 20
+Handler_icp_match 4
set join_cache_level=6;
select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
@@ -3537,10 +3537,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 40
-Handler_pushed_index_cond_filtered 32
+Handler_icp_attempts 40
+Handler_icp_match 8
set join_cache_level=7;
select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
@@ -3554,10 +3554,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 60
-Handler_pushed_index_cond_filtered 48
+Handler_icp_attempts 60
+Handler_icp_match 12
set join_cache_level=8;
select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
@@ -3571,10 +3571,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 80
-Handler_pushed_index_cond_filtered 64
+Handler_icp_attempts 80
+Handler_icp_match 16
drop table t1,t2;
set join_cache_level=default;
#
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
index 9d6135eda80..67712ccabe6 100644
--- a/mysql-test/r/lock_multi.result
+++ b/mysql-test/r/lock_multi.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2;
+drop DATABASE if exists mysqltest_1;
create table t1(n int);
insert into t1 values (1);
select get_lock("mysqltest_lock", 100);
diff --git a/mysql-test/r/maria_icp.result b/mysql-test/r/maria_icp.result
index 1b777d63578..2d0110f2f35 100644
--- a/mysql-test/r/maria_icp.result
+++ b/mysql-test/r/maria_icp.result
@@ -822,24 +822,24 @@ KEY (c1)
);
INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
+Handler_icp_attempts 0
+Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
DROP TABLE t1;
set storage_engine= @save_storage_engine;
set optimizer_switch=@maria_icp_tmp;
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index a9b0dba3fb9..f1a2af264a3 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -820,24 +820,24 @@ KEY (c1)
);
INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
+Handler_icp_attempts 0
+Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
Variable_name Value
-Handler_pushed_index_cond_checks 2
-Handler_pushed_index_cond_filtered 1
+Handler_icp_attempts 2
+Handler_icp_match 1
DROP TABLE t1;
drop table if exists t0, t1, t1i, t1m;
#
@@ -914,19 +914,4 @@ Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
-#
-# BUG#933412: Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
-#
-CREATE TABLE t1 (
-b INT,
-c VARCHAR(1) NOT NULL,
-d DATETIME,
-KEY (c, b)
-) ENGINE=MyISAM;
-# INSERT some data
-CREATE TABLE t2 ( a INT ) ENGINE=MyISAM;
-INSERT INTO t2 VALUES
-(7),(3),(7),(3);
-# Now run a number of ICP queries while trying to kill them
-DROP TABLE t1,t2;
set optimizer_switch=@myisam_icp_tmp;
diff --git a/mysql-test/r/myisam_icp_notembedded.result b/mysql-test/r/myisam_icp_notembedded.result
new file mode 100644
index 00000000000..d965cbd980d
--- /dev/null
+++ b/mysql-test/r/myisam_icp_notembedded.result
@@ -0,0 +1,19 @@
+drop table if exists t1,t2;
+set @myisam_icp_notembedded_tmp=@@optimizer_switch;
+set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+#
+# BUG#933412: Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
+#
+CREATE TABLE t1 (
+b INT,
+c VARCHAR(1) NOT NULL,
+d DATETIME,
+KEY (c, b)
+) ENGINE=MyISAM;
+# INSERT some data
+CREATE TABLE t2 ( a INT ) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+(7),(3),(7),(3);
+# Now run a number of ICP queries while trying to kill them
+DROP TABLE t1,t2;
+set optimizer_switch=@myisam_icp_notembedded_tmp;
diff --git a/mysql-test/r/myisam_mrr.result b/mysql-test/r/myisam_mrr.result
index 01d3e6aeb5d..0da0f8fd5eb 100644
--- a/mysql-test/r/myisam_mrr.result
+++ b/mysql-test/r/myisam_mrr.result
@@ -563,6 +563,9 @@ drop table t1;
flush status;
show status like 'Handler_mrr%';
Variable_name Value
+Handler_mrr_init 0
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, b int, filler char(200), key(a));
@@ -578,6 +581,9 @@ sum(b)
1230
show status like 'handler_mrr%';
Variable_name Value
+Handler_mrr_init 1
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=128;
explain select sum(b) from t1 where a < 1600;
@@ -590,6 +596,9 @@ sum(b)
196800
show status like 'handler_mrr%';
Variable_name Value
+Handler_mrr_init 1
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 1
set @@mrr_buffer_size= @mrr_buffer_size_save;
#Now, let's check BKA:
set @join_cache_level_save= @@join_cache_level;
@@ -605,6 +614,9 @@ sum(t1.b)
1230
show status like 'handler_mrr%';
Variable_name Value
+Handler_mrr_init 1
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
set join_buffer_size=10;
explain select sum(t1.b) from t0,t1 where t0.a=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -616,6 +628,9 @@ sum(t1.b)
1230
show status like 'handler_mrr%';
Variable_name Value
+Handler_mrr_init 2
+Handler_mrr_key_refills 3
+Handler_mrr_rowid_refills 3
set join_cache_level= @join_cache_level_save;
set join_buffer_size= @join_buffer_size_save;
drop table t0, t1;
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index 644137a43bd..7e3c2c45116 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -275,9 +275,12 @@ Variable_name Value
Handler_commit 0
Handler_delete 0
Handler_discover 0
+Handler_icp_attempts 0
+Handler_icp_match 0
+Handler_mrr_init 0
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
Handler_prepare 0
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
Handler_read_first 0
Handler_read_key 4
Handler_read_last 0
@@ -300,7 +303,7 @@ Created_tmp_files 0
Created_tmp_tables 2
Handler_tmp_update 2
Handler_tmp_write 7
-Rows_tmp_read 38
+Rows_tmp_read 41
drop table t1;
CREATE TABLE t1 (i int(11) DEFAULT NULL, KEY i (i) ) ENGINE=MyISAM;
insert into t1 values (1),(2),(3),(4),(5);
@@ -313,9 +316,12 @@ Variable_name Value
Handler_commit 0
Handler_delete 0
Handler_discover 0
+Handler_icp_attempts 0
+Handler_icp_match 0
+Handler_mrr_init 0
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
Handler_prepare 0
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
Handler_read_first 0
Handler_read_key 2
Handler_read_last 0
diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result
index e6db4ac2403..528d005b81b 100644
--- a/mysql-test/r/status_user.result
+++ b/mysql-test/r/status_user.result
@@ -100,9 +100,12 @@ Variable_name Value
Handler_commit 19
Handler_delete 1
Handler_discover 0
+Handler_icp_attempts 0
+Handler_icp_match 0
+Handler_mrr_init 0
+Handler_mrr_key_refills 0
+Handler_mrr_rowid_refills 0
Handler_prepare 18
-Handler_pushed_index_cond_checks 0
-Handler_pushed_index_cond_filtered 0
Handler_read_first 0
Handler_read_key 3
Handler_read_last 0
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 317b97839ed..52c7f05839e 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -587,6 +587,19 @@ Variable_name Value
Handler_read_next 1
DROP TABLE t1, t2;
End of 5.1 tests
+#
+# lp:923429 Crash in decimal_cmp on using UNIX_TIMESTAMP with a wrongly formatted timestamp
+#
+SELECT UNIX_TIMESTAMP('abc') > 0;
+UNIX_TIMESTAMP('abc') > 0
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: 'abc'
+SELECT UNIX_TIMESTAMP('abc');
+UNIX_TIMESTAMP('abc')
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: 'abc'
Bug#50888 valgrind warnings in Field_timestamp::val_str
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test
index c6017337c0a..7ef1c0da14d 100644
--- a/mysql-test/t/join_cache.test
+++ b/mysql-test/t/join_cache.test
@@ -1533,7 +1533,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
explain select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
set join_cache_level=6;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -1541,7 +1541,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
explain select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
set join_cache_level=7;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -1549,7 +1549,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
explain select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
set join_cache_level=8;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -1557,7 +1557,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1;
explain select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
-show status like "Handler_pushed%";
+show status like "Handler_icp%";
drop table t1,t2;
set join_cache_level=default;
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index b180ac9abd5..fc507608bdb 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -3,6 +3,7 @@
--disable_warnings
drop table if exists t1,t2;
+drop DATABASE if exists mysqltest_1;
--enable_warnings
# Test to see if select will get the lock ahead of low priority update
diff --git a/mysql-test/t/myisam_icp.test b/mysql-test/t/myisam_icp.test
index 39a22d00a1a..5bee6e5acaa 100644
--- a/mysql-test/t/myisam_icp.test
+++ b/mysql-test/t/myisam_icp.test
@@ -262,133 +262,5 @@ SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
---echo #
---echo # BUG#933412: Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
---echo #
-CREATE TABLE t1 (
- b INT,
- c VARCHAR(1) NOT NULL,
- d DATETIME,
- KEY (c, b)
-) ENGINE=MyISAM;
---echo # INSERT some data
---disable_query_log
-INSERT INTO t1 ( b, d, c ) VALUES
-(4,'2005-01-08 00:00:00','f'),
-(1,'2004-05-20 10:45:51','c'),(2,'2006-08-11 21:33:49','e'),
-(5,'2003-05-19 00:20:40','a'),(3,'2005-01-03 06:18:39','a'),
-(7,'2008-11-25 18:18:14','b'),(6,'2008-11-09 15:53:46','b'),
-(9,'2003-03-01 03:40:36','c'),(8,'2003-09-25 23:14:09','d'),
-(0,'2007-01-17 09:18:31','f'),(9,'2008-09-08 09:52:24','c'),
-(2,'2008-03-10 00:00:00','a'),(0,'2003-03-14 09:31:07','c'),
-(4,'2005-04-25 00:00:00','h'),(6,'2001-08-01 05:55:55','e'),
-(3,'2005-04-09 01:22:48','f'),(7,'2009-11-12 13:27:22','r'),
-(0,'2009-03-28 05:05:28','h'),(15,'2005-05-16 04:35:41','f'),
-(7,'2006-03-26 05:19:58','c'),(9,'2002-10-06 02:17:00','g'),
-(4,'2007-01-28 03:28:20','b'),(1,'2009-04-22 10:16:40','c'),
-(2,'2003-01-01 19:39:00','f'),(0,'2008-05-03 19:16:29','t'),
-(2,'2005-01-28 00:00:00','j'),(8,'2004-01-10 00:00:00','w'),
-(8,'2000-06-13 21:56:37','a'),(5,'2001-03-21 19:24:49','o'),
-(99,'2003-12-20 21:29:06','f'),(0,'1900-01-01 00:00:00','w'),
-(7,'2000-12-19 00:00:00','c'),(0,'2000-03-03 06:10:19','l'),
-(3,'2000-08-11 00:00:00','q'),(0,'2007-05-25 03:46:41','e'),
-(241,'2005-05-17 00:00:00','j'),(4,'2005-11-02 00:44:06','r'),
-(43,'2001-07-11 00:00:00','a'),(1,'2008-12-01 18:30:27','z'),
-(4,'2004-10-25 00:00:00','i'),(5,'2000-04-08 12:12:01','c'),
-(0,'1900-01-01 00:00:00','f'),(9,'2002-05-13 22:47:02','p'),
-(1,'2008-10-09 15:39:40','d'),(3,'2004-06-24 00:00:00','d'),
-(0,'2008-03-06 00:00:00','r'),(9,'2007-04-16 18:40:03','i'),
-(3,'2008-03-16 19:49:37','t'),(7,'2003-07-15 08:11:21','d'),
-(8,'2005-02-11 00:04:53','r'),(0,'2002-09-21 00:00:00','y'),
-(3,'2004-11-03 00:37:21','z'),(6,'2007-10-18 00:00:00','e'),
-(6,'2007-01-21 10:42:56','o'),(5,'2000-03-26 21:21:04','b'),
-(9,'2001-03-15 08:08:21','e'),(1,'2001-10-16 12:56:59','a'),
-(6,'2004-05-01 23:45:55','o'),(4,'2000-03-04 00:00:00','f'),
-(9,'2002-12-03 16:48:28','e'),(8,'2003-01-09 00:36:07','m'),
-(1,'2006-06-22 04:32:41','s'),(8,'2008-09-20 05:01:48','q'),
-(4,'2006-06-02 22:15:31','g'),(2,'2002-05-14 07:07:42','e'),
-(7,'2005-06-05 01:30:42','r'),(127,'2004-05-11 01:56:48','a'),
-(210,'2003-11-05 00:41:34','z'),(5,'1900-01-01 00:00:00','h'),
-(1,'2006-04-16 00:00:00','f'),(7,'2000-12-17 00:00:00','x'),
-(8,'2009-05-09 20:43:07','b'),(175,'2008-11-26 16:33:09','p'),
-(0,'2002-05-09 21:18:44','v'),(8,'2002-06-01 11:32:25','k'),
-(1,'2008-11-09 23:56:00','a'),(0,'2008-01-08 10:18:46','c'),
-(2,'2005-04-16 00:00:00','o'),(5,'2002-08-25 00:00:00','b'),
-(64,'2005-12-05 21:51:52','b'),(4,'2005-08-10 00:00:00','i'),
-(6,'2006-03-23 00:00:00','d'),(9,'2007-01-27 00:00:00','i'),
-(8,'2008-08-16 00:00:00','a'),(7,'2003-01-16 12:13:18','k'),
-(0,'2003-06-22 00:00:00','v'),(5,'2008-06-20 05:43:56','u'),
-(8,'2004-09-23 18:57:17','e'),(1,'2000-12-26 00:00:00','y'),
-(4,'2009-06-01 13:00:28','e'),(1,'2009-11-18 06:28:48','m'),
-(0,'2004-06-12 10:01:10','e'),(2,'2005-10-16 01:48:55','e'),
-(5,'2001-12-23 09:50:21','l'),(6,'1900-01-01 00:00:00','a'),
-(1,'2001-10-28 00:00:00','d'),(1,'2008-07-12 23:30:19','s'),
-(0,'2002-10-11 16:51:16','r'),(4,'2007-09-18 06:27:10','x'),
-(1,'2007-02-21 12:28:14','e'),(6,'2001-09-16 00:00:00','f'),
-(0,'2007-09-20 02:25:45','c'),(0,'2006-08-07 03:25:56','j'),
-(8,'2006-12-04 20:20:32','t'),(7,'2007-09-05 10:13:10','i'),
-(9,'2006-04-12 17:59:57','t'),(2,'2009-04-28 00:06:09','b'),
-(8,'2000-01-07 00:00:00','b'),(7,'2000-03-25 10:04:41','k'),
-(4,'2000-07-10 00:44:55','w'),(9,'2007-09-22 14:26:26','j'),
-(9,'2003-09-11 22:41:17','a'),(0,'2004-06-07 13:52:32','c'),
-(8,'2008-10-09 00:00:00','p'),(1,'2007-04-01 00:00:00','c'),
-(9,'2000-12-05 00:00:00','i'),(3,'1900-01-01 00:00:00','a'),
-(3,'2005-12-24 21:50:54','e'),(8,'2009-07-21 19:34:55','n'),
-(9,'2005-11-13 17:57:56','d'),(7,'2004-10-07 06:41:39','l'),
-(1,'2004-11-20 08:05:08','u'),(3,'2005-05-25 00:00:00','r'),
-(1,'2006-09-02 14:16:41','u'),(8,'2006-01-07 00:00:00','a'),
-(9,'2003-04-05 00:54:20','w'),(2,'2003-12-22 00:00:00','a'),
-(9,'2006-04-16 17:31:40','e'),(6,'2005-02-10 14:22:46','e'),
-(7,'2004-04-27 05:54:52','p'),(1,'2005-12-07 00:00:00','t'),
-(5,'2004-04-03 20:56:28','d'),(4,'2000-09-07 05:17:16','h'),
-(2,'2004-08-04 16:10:42','i'),(1,'2007-03-04 00:00:00','b'),
-(9,'1900-01-01 00:00:00','d'),(1,'2000-05-12 23:02:50','m'),
-(2,'1900-01-01 00:00:00','l'),(1,'1900-01-01 00:00:00','k'),
-(4,'2000-07-14 01:25:18','d'),(5,'2009-08-21 00:00:00','w'),
-(6,'2009-05-25 13:33:54','f'),(7,'2006-06-13 00:00:00','e'),
-(8,'1900-01-01 00:00:00','a'),(6,'2004-02-24 00:00:00','j'),
-(0,'2003-05-21 07:03:46','k'),(9,'1900-01-01 00:00:00','e'),
-(2,'1900-01-01 00:00:00','y'),(2,'2000-12-22 00:00:00','e'),
-(3,'2003-09-26 00:00:00','f'),(2,'2001-01-13 08:20:19','h'),
-(9,'2008-09-23 20:03:28','n'),(5,'2007-03-20 02:41:38','s'),
-(1,'2009-02-14 10:27:18','a'),(0,'2001-08-10 17:44:05','s'),
-(3,'2008-01-20 12:49:54','v'),(1,'2001-05-05 09:09:59','r');
---enable_query_log
-CREATE TABLE t2 ( a INT ) ENGINE=MyISAM;
-INSERT INTO t2 VALUES
- (7),(3),(7),(3);
-
-# 'con2' will be the connection that will run all the KILLable statements
---connect (con2,127.0.0.1,root,,test)
-
---let $run = 300
---let $con_id = `SELECT CONNECTION_ID()`
-
---echo # Now run a number of ICP queries while trying to kill them
---disable_query_log
---disable_result_log
-while ($run)
-{
- --send
- SELECT * FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
- ON alias2.c = alias1.c
- WHERE alias2.b >= 9;
-
- --connect (con1,127.0.0.1,root,,test)
- --eval KILL QUERY $con_id
- --disconnect con1
-
- --dec $run
-
- --connection con2
- --error 0,ER_QUERY_INTERRUPTED
- --reap
-}
---enable_result_log
---enable_query_log
---disconnect con2
---connection default
-DROP TABLE t1,t2;
-
set optimizer_switch=@myisam_icp_tmp;
diff --git a/mysql-test/t/myisam_icp_notembedded.test b/mysql-test/t/myisam_icp_notembedded.test
new file mode 100644
index 00000000000..139a9edf648
--- /dev/null
+++ b/mysql-test/t/myisam_icp_notembedded.test
@@ -0,0 +1,139 @@
+-- source include/not_embedded.inc
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+set @myisam_icp_notembedded_tmp=@@optimizer_switch;
+set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+
+--echo #
+--echo # BUG#933412: Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
+--echo #
+CREATE TABLE t1 (
+ b INT,
+ c VARCHAR(1) NOT NULL,
+ d DATETIME,
+ KEY (c, b)
+) ENGINE=MyISAM;
+--echo # INSERT some data
+--disable_query_log
+INSERT INTO t1 ( b, d, c ) VALUES
+(4,'2005-01-08 00:00:00','f'),
+(1,'2004-05-20 10:45:51','c'),(2,'2006-08-11 21:33:49','e'),
+(5,'2003-05-19 00:20:40','a'),(3,'2005-01-03 06:18:39','a'),
+(7,'2008-11-25 18:18:14','b'),(6,'2008-11-09 15:53:46','b'),
+(9,'2003-03-01 03:40:36','c'),(8,'2003-09-25 23:14:09','d'),
+(0,'2007-01-17 09:18:31','f'),(9,'2008-09-08 09:52:24','c'),
+(2,'2008-03-10 00:00:00','a'),(0,'2003-03-14 09:31:07','c'),
+(4,'2005-04-25 00:00:00','h'),(6,'2001-08-01 05:55:55','e'),
+(3,'2005-04-09 01:22:48','f'),(7,'2009-11-12 13:27:22','r'),
+(0,'2009-03-28 05:05:28','h'),(15,'2005-05-16 04:35:41','f'),
+(7,'2006-03-26 05:19:58','c'),(9,'2002-10-06 02:17:00','g'),
+(4,'2007-01-28 03:28:20','b'),(1,'2009-04-22 10:16:40','c'),
+(2,'2003-01-01 19:39:00','f'),(0,'2008-05-03 19:16:29','t'),
+(2,'2005-01-28 00:00:00','j'),(8,'2004-01-10 00:00:00','w'),
+(8,'2000-06-13 21:56:37','a'),(5,'2001-03-21 19:24:49','o'),
+(99,'2003-12-20 21:29:06','f'),(0,'1900-01-01 00:00:00','w'),
+(7,'2000-12-19 00:00:00','c'),(0,'2000-03-03 06:10:19','l'),
+(3,'2000-08-11 00:00:00','q'),(0,'2007-05-25 03:46:41','e'),
+(241,'2005-05-17 00:00:00','j'),(4,'2005-11-02 00:44:06','r'),
+(43,'2001-07-11 00:00:00','a'),(1,'2008-12-01 18:30:27','z'),
+(4,'2004-10-25 00:00:00','i'),(5,'2000-04-08 12:12:01','c'),
+(0,'1900-01-01 00:00:00','f'),(9,'2002-05-13 22:47:02','p'),
+(1,'2008-10-09 15:39:40','d'),(3,'2004-06-24 00:00:00','d'),
+(0,'2008-03-06 00:00:00','r'),(9,'2007-04-16 18:40:03','i'),
+(3,'2008-03-16 19:49:37','t'),(7,'2003-07-15 08:11:21','d'),
+(8,'2005-02-11 00:04:53','r'),(0,'2002-09-21 00:00:00','y'),
+(3,'2004-11-03 00:37:21','z'),(6,'2007-10-18 00:00:00','e'),
+(6,'2007-01-21 10:42:56','o'),(5,'2000-03-26 21:21:04','b'),
+(9,'2001-03-15 08:08:21','e'),(1,'2001-10-16 12:56:59','a'),
+(6,'2004-05-01 23:45:55','o'),(4,'2000-03-04 00:00:00','f'),
+(9,'2002-12-03 16:48:28','e'),(8,'2003-01-09 00:36:07','m'),
+(1,'2006-06-22 04:32:41','s'),(8,'2008-09-20 05:01:48','q'),
+(4,'2006-06-02 22:15:31','g'),(2,'2002-05-14 07:07:42','e'),
+(7,'2005-06-05 01:30:42','r'),(127,'2004-05-11 01:56:48','a'),
+(210,'2003-11-05 00:41:34','z'),(5,'1900-01-01 00:00:00','h'),
+(1,'2006-04-16 00:00:00','f'),(7,'2000-12-17 00:00:00','x'),
+(8,'2009-05-09 20:43:07','b'),(175,'2008-11-26 16:33:09','p'),
+(0,'2002-05-09 21:18:44','v'),(8,'2002-06-01 11:32:25','k'),
+(1,'2008-11-09 23:56:00','a'),(0,'2008-01-08 10:18:46','c'),
+(2,'2005-04-16 00:00:00','o'),(5,'2002-08-25 00:00:00','b'),
+(64,'2005-12-05 21:51:52','b'),(4,'2005-08-10 00:00:00','i'),
+(6,'2006-03-23 00:00:00','d'),(9,'2007-01-27 00:00:00','i'),
+(8,'2008-08-16 00:00:00','a'),(7,'2003-01-16 12:13:18','k'),
+(0,'2003-06-22 00:00:00','v'),(5,'2008-06-20 05:43:56','u'),
+(8,'2004-09-23 18:57:17','e'),(1,'2000-12-26 00:00:00','y'),
+(4,'2009-06-01 13:00:28','e'),(1,'2009-11-18 06:28:48','m'),
+(0,'2004-06-12 10:01:10','e'),(2,'2005-10-16 01:48:55','e'),
+(5,'2001-12-23 09:50:21','l'),(6,'1900-01-01 00:00:00','a'),
+(1,'2001-10-28 00:00:00','d'),(1,'2008-07-12 23:30:19','s'),
+(0,'2002-10-11 16:51:16','r'),(4,'2007-09-18 06:27:10','x'),
+(1,'2007-02-21 12:28:14','e'),(6,'2001-09-16 00:00:00','f'),
+(0,'2007-09-20 02:25:45','c'),(0,'2006-08-07 03:25:56','j'),
+(8,'2006-12-04 20:20:32','t'),(7,'2007-09-05 10:13:10','i'),
+(9,'2006-04-12 17:59:57','t'),(2,'2009-04-28 00:06:09','b'),
+(8,'2000-01-07 00:00:00','b'),(7,'2000-03-25 10:04:41','k'),
+(4,'2000-07-10 00:44:55','w'),(9,'2007-09-22 14:26:26','j'),
+(9,'2003-09-11 22:41:17','a'),(0,'2004-06-07 13:52:32','c'),
+(8,'2008-10-09 00:00:00','p'),(1,'2007-04-01 00:00:00','c'),
+(9,'2000-12-05 00:00:00','i'),(3,'1900-01-01 00:00:00','a'),
+(3,'2005-12-24 21:50:54','e'),(8,'2009-07-21 19:34:55','n'),
+(9,'2005-11-13 17:57:56','d'),(7,'2004-10-07 06:41:39','l'),
+(1,'2004-11-20 08:05:08','u'),(3,'2005-05-25 00:00:00','r'),
+(1,'2006-09-02 14:16:41','u'),(8,'2006-01-07 00:00:00','a'),
+(9,'2003-04-05 00:54:20','w'),(2,'2003-12-22 00:00:00','a'),
+(9,'2006-04-16 17:31:40','e'),(6,'2005-02-10 14:22:46','e'),
+(7,'2004-04-27 05:54:52','p'),(1,'2005-12-07 00:00:00','t'),
+(5,'2004-04-03 20:56:28','d'),(4,'2000-09-07 05:17:16','h'),
+(2,'2004-08-04 16:10:42','i'),(1,'2007-03-04 00:00:00','b'),
+(9,'1900-01-01 00:00:00','d'),(1,'2000-05-12 23:02:50','m'),
+(2,'1900-01-01 00:00:00','l'),(1,'1900-01-01 00:00:00','k'),
+(4,'2000-07-14 01:25:18','d'),(5,'2009-08-21 00:00:00','w'),
+(6,'2009-05-25 13:33:54','f'),(7,'2006-06-13 00:00:00','e'),
+(8,'1900-01-01 00:00:00','a'),(6,'2004-02-24 00:00:00','j'),
+(0,'2003-05-21 07:03:46','k'),(9,'1900-01-01 00:00:00','e'),
+(2,'1900-01-01 00:00:00','y'),(2,'2000-12-22 00:00:00','e'),
+(3,'2003-09-26 00:00:00','f'),(2,'2001-01-13 08:20:19','h'),
+(9,'2008-09-23 20:03:28','n'),(5,'2007-03-20 02:41:38','s'),
+(1,'2009-02-14 10:27:18','a'),(0,'2001-08-10 17:44:05','s'),
+(3,'2008-01-20 12:49:54','v'),(1,'2001-05-05 09:09:59','r');
+--enable_query_log
+CREATE TABLE t2 ( a INT ) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+ (7),(3),(7),(3);
+
+# 'con2' will be the connection that will run all the KILLable statements
+--connect (con2,127.0.0.1,root,,test)
+
+--let $run = 300
+--let $con_id = `SELECT CONNECTION_ID()`
+
+--echo # Now run a number of ICP queries while trying to kill them
+--disable_query_log
+--disable_result_log
+while ($run)
+{
+ --send
+ SELECT * FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
+ ON alias2.c = alias1.c
+ WHERE alias2.b >= 9;
+
+ --connect (con1,127.0.0.1,root,,test)
+ --eval KILL QUERY $con_id
+ --disconnect con1
+
+ --dec $run
+
+ --connection con2
+ --error 0,ER_QUERY_INTERRUPTED
+ --reap
+}
+--enable_result_log
+--enable_query_log
+--disconnect con2
+--connection default
+DROP TABLE t1,t2;
+
+set optimizer_switch=@myisam_icp_notembedded_tmp;
+
diff --git a/mysql-test/t/myisam_mrr.test b/mysql-test/t/myisam_mrr.test
index 28385c61b0f..0f916299ae7 100644
--- a/mysql-test/t/myisam_mrr.test
+++ b/mysql-test/t/myisam_mrr.test
@@ -313,7 +313,6 @@ set join_buffer_size=10;
explain select sum(t1.b) from t0,t1 where t0.a=t1.a;
flush status;
select sum(t1.b) from t0,t1 where t0.a=t1.a;
---replace_result 1 1or2 2 1or2
show status like 'handler_mrr%';
set join_cache_level= @join_cache_level_save;
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index f2704ec1203..575c30431b6 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -411,6 +411,12 @@ DROP TABLE t1, t2;
--echo End of 5.1 tests
+--echo #
+--echo # lp:923429 Crash in decimal_cmp on using UNIX_TIMESTAMP with a wrongly formatted timestamp
+--echo #
+SELECT UNIX_TIMESTAMP('abc') > 0;
+SELECT UNIX_TIMESTAMP('abc');
+
--echo
--echo Bug#50888 valgrind warnings in Field_timestamp::val_str
--echo
@@ -441,4 +447,3 @@ SELECT MAX(dt) = '2011-01-06 12:34:30' FROM t1;
DROP TABLE t1;
--echo End of 5.5 tests
-