diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-03-16 14:12:00 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-03-16 14:12:00 +0200 |
commit | 98eb9518db1da854048b09d94244a982a1d32f9a (patch) | |
tree | 9f00cc33b5cb43fd11da3c3d62903b4c009bffa0 /sql/opt_subselect.cc | |
parent | b0c43d0c381dba1ab859de8f643d8d91dd806009 (diff) | |
parent | 0a534348c75cf435d2017959855de2efa798fd0b (diff) | |
download | mariadb-git-98eb9518db1da854048b09d94244a982a1d32f9a.tar.gz |
Merge remote-tracking branch 'origin/10.1' into 10.2
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 430481295f6..3ed2a14bef1 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -877,8 +877,10 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs) Make sure that create_tmp_table will not fail due to too long keys. 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. + Make sure that the length of the key for the temp_table is atleast + greater than 0. */ - if (total_key_length > tmp_table_max_key_length() || + if (!total_key_length || total_key_length > tmp_table_max_key_length() || elements > tmp_table_max_key_parts()) DBUG_RETURN(FALSE); |