From 0f8b194146b50afe442682c5a14a8a179e28f3b8 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 19 Feb 2015 20:54:20 +0300 Subject: MDEV-6687: Assertion `0' failed in Protocol::end_statement on query Redefine FT_KEYPART in a way that it does not conflict with Hash Join. Hash join stores field->field_index in KEYUSE::keypart, so we must use a value of FT_KEYPART that's greater than MAX_FIELDS. --- mysql-test/r/join_cache.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/r/join_cache.result') diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result index 456e17a91f7..c1dbef08c04 100644 --- a/mysql-test/r/join_cache.result +++ b/mysql-test/r/join_cache.result @@ -5874,4 +5874,17 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where set join_buffer_space_limit=default; drop table t1; +# +# MDEV-6687: Assertion `0' failed in Protocol::end_statement on query +# +SET join_cache_level = 3; +# The following should have +# - table order PROFILING,user, +# - table user accessed with hash_ALL: +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where +1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join) +set join_cache_level=default; set @@optimizer_switch=@save_optimizer_switch; -- cgit v1.2.1