fix for Bug#46897 'Test "index_merge_innodb" fails (mostly)':
that was already analyzed by Oracle: EXPLAIN can return 3 or 4 in "rows"; using replace_column to work around this.
This commit is contained in:
parent
fe4ae6b058
commit
0e8f2efa6e
@ -122,12 +122,20 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
|
||||
analyze table t1;
|
||||
select count(*) from t1;
|
||||
|
||||
if ($index_merge_random_rows_in_EXPLAIN)
|
||||
{
|
||||
--replace_column 9 #
|
||||
}
|
||||
explain select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
|
||||
|
||||
select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
|
||||
|
||||
if ($index_merge_random_rows_in_EXPLAIN)
|
||||
{
|
||||
--replace_column 9 #
|
||||
}
|
||||
explain select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
|
||||
|
||||
|
@ -111,7 +111,7 @@ count(*)
|
||||
explain select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 4 Using intersect(i1,i2); Using where; Using index
|
||||
1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL # Using intersect(i1,i2); Using where; Using index
|
||||
select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
|
||||
count(*)
|
||||
@ -119,7 +119,7 @@ count(*)
|
||||
explain select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 4 Using intersect(i1,i3); Using where; Using index
|
||||
1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL # Using intersect(i1,i3); Using where; Using index
|
||||
select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
|
||||
count(*)
|
||||
|
@ -12,6 +12,12 @@
|
||||
|
||||
--source include/have_innodb.inc
|
||||
let $engine_type= InnoDB;
|
||||
# According to Oracle: "InnoDB's estimate for the index cardinality
|
||||
# depends on a pseudo random number generator (it picks up random
|
||||
# pages to sample). After an optimization that was made in r2625 two
|
||||
# EXPLAINs started returning a different number of rows (3 instead of
|
||||
# 4)", so:
|
||||
let $index_merge_random_rows_in_EXPLAIN = 1;
|
||||
# InnoDB does not support Merge tables (affects include/index_merge1.inc)
|
||||
let $merge_table_support= 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user