[Commits] f717fb8: Make rocksdb.type_varchar test stable

Sergei Petrunia psergey at askmonty.org
Sun Aug 6 14:42:30 EEST 2017


revision-id: f717fb824228d83a6cffc4164d64f40732197066
parent(s): 1b0cf1b7295f1abee3bd62aa36a1c8aeff0d098d
committer: Sergei Petrunia
branch nick: 10.3
timestamp: 2017-08-06 14:42:30 +0300
message:

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 b329718..9cfc82c 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
@@ -203,10 +203,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
@@ -315,10 +315,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
@@ -427,10 +427,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
@@ -539,10 +539,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
@@ -651,10 +651,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 f813b88..253a5a3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc
+++ b/storage/rocksdb/mysql-test/rocksdb/t/type_varchar_endspace.inc
@@ -52,8 +52,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