summaryrefslogtreecommitdiff
path: root/mysql-test/main/range_innodb.result
diff options
context:
space:
mode:
authorVarun <varun.gupta@mariadb.com>2019-06-14 12:16:17 +0530
committerVarun <varun.gupta@mariadb.com>2019-06-14 23:08:00 +0530
commit772c5f3c78fcdaea2169ba435bac8d851c7945c7 (patch)
treed65668d14e00ab0174ac39d14e086e25ef645a11 /mysql-test/main/range_innodb.result
parent1e3dc15d62c2f7f7d3afe6affb0db66c8515234d (diff)
downloadmariadb-git-772c5f3c78fcdaea2169ba435bac8d851c7945c7.tar.gz
MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, [Warning] InnoDB: Using a partial-field key prefix in search
For a key with keyparts (k1,k2,k3) , if we are building a range over the keyparts we should make sure that if min_value/max_value for a keypart is not added to key buffer then the keyparts following should also not be allowed.
Diffstat (limited to 'mysql-test/main/range_innodb.result')
-rw-r--r--mysql-test/main/range_innodb.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result
index 30161a2711d..8774a623826 100644
--- a/mysql-test/main/range_innodb.result
+++ b/mysql-test/main/range_innodb.result
@@ -80,3 +80,21 @@ ERROR HY000: Table definition has changed, please retry transaction
DROP TABLE t0,t1;
set @@global.debug_dbug="-d";
set @@optimizer_switch= @optimizer_switch_save;
+#
+# MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase,
+# [Warning] InnoDB: Using a partial-field key prefix in search
+#
+CREATE TABLE t1 (
+pk INT,
+a VARCHAR(1),
+b INT,
+PRIMARY KEY (pk),
+KEY (a,b)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
+explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index PRIMARY,a a 9 NULL 2 Using where; Using index
+SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+a
+drop table t1;