summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
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/sql_select.h
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/sql_select.h')
-rw-r--r--sql/sql_select.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4f807ff5b93..4650bc24c68 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -40,8 +40,21 @@
#endif
#if defined(USE_ARIA_FOR_TMP_TABLES)
#define TMP_ENGINE_HTON maria_hton
+inline uint tmp_table_max_key_length() {
+ return maria_max_key_length();
+}
+
+inline uint tmp_table_max_key_parts() {
+ return maria_max_key_segments();
+}
#else
#define TMP_ENGINE_HTON myisam_hton
+inline uint tmp_table_max_key_length() {
+ return MI_MAX_KEY_LENGTH;
+}
+inline uint tmp_table_max_key_parts() {
+ return MI_MAX_KEY_SEG;
+}
#endif
/* Values in optimize */
#define KEY_OPTIMIZE_EXISTS 1