From ac54df04d80781ea243cfbc8865bfe080b44f4e2 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Wed, 25 Sep 2013 17:23:22 +0400 Subject: MDEV-5070 - EXPLAIN INSERT ... SELECT crashes on 10.0-base-explain-slowquerylog - Add EXPLAIN output print out for INSERT/REPLACE ... SELECT --- mysql-test/r/explain_non_select.result | 13 +++++++++++++ mysql-test/t/explain_non_select.test | 12 ++++++++++++ 2 files changed, 25 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/explain_non_select.result b/mysql-test/r/explain_non_select.result index 021c5d92daa..267b5f27c35 100644 --- a/mysql-test/r/explain_non_select.result +++ b/mysql-test/r/explain_non_select.result @@ -114,3 +114,16 @@ explain delete from t0 returning a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 4 drop table t0; +# +# MDEV-5070 - EXPLAIN INSERT ... SELECT crashes on 10.0-base-explain-slowquerylog +# +create table t0 (a int); +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +create table t1 (a int); +explain insert into t1 select * from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 +explain replace into t1 select * from t0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 8 +drop table t0, t1; diff --git a/mysql-test/t/explain_non_select.test b/mysql-test/t/explain_non_select.test index 7385ef5d420..316720b17f3 100644 --- a/mysql-test/t/explain_non_select.test +++ b/mysql-test/t/explain_non_select.test @@ -94,4 +94,16 @@ explain delete from t0 where a=1 returning a; explain delete from t0 returning a; drop table t0; +--echo # +--echo # MDEV-5070 - EXPLAIN INSERT ... SELECT crashes on 10.0-base-explain-slowquerylog +--echo # +create table t0 (a int); +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +create table t1 (a int); + +explain insert into t1 select * from t0; +explain replace into t1 select * from t0; + +drop table t0, t1; + -- cgit v1.2.1