1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix testcase to be platform-independent

This commit is contained in:
unknown
2007-07-02 22:18:41 +04:00
parent 07dcc80023
commit b0696f5457
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
drop table if exists t1,t2; drop table if exists t1,t2,t3,t4;
create table t1 ( create table t1 (
c_id int(11) not null default '0', c_id int(11) not null default '0',
org_id int(11) default null, org_id int(11) default null,
@ -711,7 +711,7 @@ EXPLAIN
SELECT COUNT(*) FROM t1 SELECT COUNT(*) FROM t1
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL 3263 Using where 1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL # Using where
SELECT COUNT(*) FROM t1 SELECT COUNT(*) FROM t1
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
COUNT(*) COUNT(*)
@ -720,7 +720,7 @@ EXPLAIN
SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c)
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL 3262 Using sort_union(idx_c,idx_b); Using where 1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL # Using sort_union(idx_c,idx_b); Using where
SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c)
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
COUNT(*) COUNT(*)

View File

@ -1,7 +1,7 @@
-- source include/have_innodb.inc -- source include/have_innodb.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2,t3,t4;
--enable_warnings --enable_warnings
# BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer # BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer
@ -709,12 +709,14 @@ set @@sort_buffer_size=8192;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
--replace_column 9 #
EXPLAIN EXPLAIN
SELECT COUNT(*) FROM t1 SELECT COUNT(*) FROM t1
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
SELECT COUNT(*) FROM t1 SELECT COUNT(*) FROM t1
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
--replace_column 9 #
EXPLAIN EXPLAIN
SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c)
WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;