summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2016-02-10 03:49:11 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2016-02-10 04:00:08 +0200
commit3c5c04bd2bccbfeb62a86bdc5610b1dcea378dd3 (patch)
tree184f3fbd9a0302c8da3d4b0dda0a0ce55edc8f83 /sql/opt_subselect.cc
parent6b614c620ec32cd8d96be880bbc8ff7c45bac7ce (diff)
downloadmariadb-git-3c5c04bd2bccbfeb62a86bdc5610b1dcea378dd3.tar.gz
MDEV-7122: Assertion `0' failed in subselect_hash_sj_engine::init
Fix test failure when using maria small-block size. We need to query the max_key_length and max_key_parts based on the the tmp table engine.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 4c7925e3e71..5137d8a0986 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -873,7 +873,8 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
See MDEV-7122. This check is performed inside create_tmp_table also and
we must do it so that we know the table has keys created.
*/
- if (total_key_length > HA_MAX_KEY_LENGTH || elements > HA_MAX_KEY_SEG)
+ if (total_key_length > tmp_table_max_key_length() ||
+ elements > tmp_table_max_key_parts())
DBUG_RETURN(FALSE);
in_subs->types_allow_materialization= TRUE;