[Commits] 93a6eed: Backport to 10.2: Make rocksdb.type_varchar test stable

Sergei Petrunia psergey at askmonty.org
Sun Aug 6 15:36:50 EEST 2017


revision-id: 93a6eed60749ed81c0a842b2705b19f7c296c7c2
parent(s): 7925a4bce885401e3b3ea31862efa91026197889
committer: Sergei Petrunia
branch nick: 10.2-mariarocks
timestamp: 2017-08-06 15:36:50 +0300
message:

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

---
 .../rocksdb/mysql-test/rocksdb/r/type_varchar.result | 20 ++++++++++----------
 .../mysql-test/rocksdb/t/type_varchar_endspace.inc   |  4 ++--
 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 365a9b7..c9fa716 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 bcca0c3..494f0ea 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');


More information about the commits mailing list