summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2017-08-06 15:36:50 +0300
committerSergei Petrunia <psergey@askmonty.org>2017-08-06 15:36:50 +0300
commit93a6eed60749ed81c0a842b2705b19f7c296c7c2 (patch)
tree66d110c3cd67d5d0bc48706a7e0da0e14608a06e
parent7925a4bce885401e3b3ea31862efa91026197889 (diff)
downloadmariadb-git-93a6eed60749ed81c0a842b2705b19f7c296c7c2.tar.gz
Backport to 10.2: Make rocksdb.type_varchar test stable
It may produce test failures like this because of non-deterministic cost calculations: -1 SIMPLE t1 # col1 col1 259 NULL # Using where +1 SIMPLE t1 # col1 NULL NULL NULL # Using where
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result20
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc4
2 files changed, 12 insertions, 12 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
index 365a9b7b3b3..c9fa716dffc 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
@@ -206,10 +206,10 @@ a 61
ab 6162
# Must show 'using index' for latin1_bin and utf8_bin:
explain
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 # col1 col1 67 NULL # Using where; Using index
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
col1 hex(col1)
a 61202009
a 6120
@@ -321,10 +321,10 @@ a 61
ab 6162
# Must show 'using index' for latin1_bin and utf8_bin:
explain
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 # col1 col1 195 NULL # Using where; Using index
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
col1 hex(col1)
a 61202009
a 6120
@@ -436,10 +436,10 @@ a 0061
a 0061002000200009
# Must show 'using index' for latin1_bin and utf8_bin:
explain
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 # col1 col1 131 NULL # Using where
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
col1 hex(col1)
a 0061002000200009
a 00610020
@@ -551,10 +551,10 @@ a 61
a 61202009
# Must show 'using index' for latin1_bin and utf8_bin:
explain
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 # col1 col1 259 NULL # Using where
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
col1 hex(col1)
a 61202009
a 6120
@@ -666,10 +666,10 @@ a 0061
a 0061002000200009
# Must show 'using index' for latin1_bin and utf8_bin:
explain
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 # col1 col1 259 NULL # Using where
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
col1 hex(col1)
a 0061002000200009
a 00610020
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc b/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc
index bcca0c3a499..494f0ea1395 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc
+++ b/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc
@@ -53,8 +53,8 @@ select col1, hex(col1) from t1;
--echo # Must show 'using index' for latin1_bin and utf8_bin:
--replace_column 4 # 9 #
explain
-select col1, hex(col1) from t1 where col1 < 'b';
-select col1, hex(col1) from t1 where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
+select col1, hex(col1) from t1 force index(col1) where col1 < 'b';
delete from t1;
insert into t1 values(10, '', 'empty');