diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 15:13:57 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 15:13:57 +0400 |
commit | 6fae4447f0873c159d94d1a3d8deafbd224d8100 (patch) | |
tree | 4b16f2510acee5fca6499363adf429bd79d6e51a /mysql-test | |
parent | 5116bed06c1a1641d54d8de8bc8770ad65ab165d (diff) | |
download | mariadb-git-6fae4447f0873c159d94d1a3d8deafbd224d8100.tar.gz |
# MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store...
- Make all functions that produce parts of EXPLAIN output take
explain_flags as parameter, instead of looking into thd->lex->describe
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/show_explain.result | 28 | ||||
-rw-r--r-- | mysql-test/t/show_explain.test | 27 |
2 files changed, 53 insertions, 2 deletions
diff --git a/mysql-test/r/show_explain.result b/mysql-test/r/show_explain.result index db1d57b7004..4f0e89975ff 100644 --- a/mysql-test/r/show_explain.result +++ b/mysql-test/r/show_explain.result @@ -309,4 +309,32 @@ a 4 set debug=''; DROP TABLE t2; +# +# MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with +# SHOW EXPLAIN over EXPLAIN EXTENDED +# +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (1),(2),(1),(4),(2); +EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` +set @show_explain_probe_select_id=1; +set debug='d,show_explain_probe_join_exec_end'; +EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +Warnings: +Note 1003 EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` +set debug=''; +DROP TABLE t2; drop table t0,t1; diff --git a/mysql-test/t/show_explain.test b/mysql-test/t/show_explain.test index 8c9d5f4c1e8..02850efedd8 100644 --- a/mysql-test/t/show_explain.test +++ b/mysql-test/t/show_explain.test @@ -319,11 +319,34 @@ evalp show explain for $thr2; connection con1; reap; set debug=''; +DROP TABLE t2; -## TODO: Test this: have several SHOW EXPLAIN requests be queued up for a -## thread and served together. +--echo # +--echo # MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with +--echo # SHOW EXPLAIN over EXPLAIN EXTENDED +--echo # + + +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (1),(2),(1),(4),(2); + +EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; + +set @show_explain_probe_select_id=1; +set debug='d,show_explain_probe_join_exec_end'; +send EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; +connection default; +--source include/wait_condition.inc +evalp show explain for $thr2; +connection con1; +reap; +set debug=''; DROP TABLE t2; + +## TODO: Test this: have several SHOW EXPLAIN requests be queued up for a +## thread and served together. + drop table t0,t1; |