summaryrefslogtreecommitdiff
path: root/mysql-test/r/explain.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-03-11 14:10:44 +0200
committerGeorgi Kodinov <joro@sun.com>2009-03-11 14:10:44 +0200
commitd3d6f4fdad8176abe0d8981d79a925731df9a5d0 (patch)
treee83e191a13e71272f8cbe61c90ea6c90757d6fd7 /mysql-test/r/explain.result
parent0614532a92d482eb31b6a2e1043f2b3b612b2e1f (diff)
downloadmariadb-git-d3d6f4fdad8176abe0d8981d79a925731df9a5d0.tar.gz
Bug #43354: Use key hint can crash server in explain extended query
The copy of the original arguments of a aggregate function was not initialized until after fix_fields(). Sometimes (e.g. when there's an error processing the statement) the print() can be called with no corresponding fix_fields() call. Fixed by adding a check if the Item is fixed before using the arguments copy. mysql-test/r/explain.result: Bug #43354: test case mysql-test/t/explain.test: Bug #43354: test case sql/item_sum.cc: Bug #43354: use the argument list copy only if it's initialized
Diffstat (limited to 'mysql-test/r/explain.result')
-rw-r--r--mysql-test/r/explain.result4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result
index 3aa189f4a9d..b0adc428e4c 100644
--- a/mysql-test/r/explain.result
+++ b/mysql-test/r/explain.result
@@ -155,3 +155,7 @@ id select_type table type possible_keys key key_len ref rows Extra
Warnings:
Note 1003 select 1 AS `1` from (select count(distinct `test`.`t1`.`a`) AS `COUNT(DISTINCT t1.a)` from `test`.`t1` join `test`.`t2` group by `test`.`t1`.`a`) `s1`
DROP TABLE t1,t2;
+CREATE TABLE t1 (a INT PRIMARY KEY);
+EXPLAIN EXTENDED SELECT COUNT(a) FROM t1 USE KEY(a);
+ERROR HY000: Key 'a' doesn't exist in table 't1'
+DROP TABLE t1;