Commit 40b7efb3 authored by Michael Widenius's avatar Michael Widenius

Fixed failing test cases

mysql-test/include/have_not_innodb_plugin.inc:
  Also detect if xtradb is installed
mysql-test/suite/innodb/t/innodb_bug56143.test:
  Disabled test case that doesn't work for innodb_plugin/xtradb.
mysql-test/suite/innodb_plugin/r/innodb_bug56632.result:
  Updated result (key_block_size is lower case in MariaDB, as all other options)
mysql-test/suite/pbxt/r/partition_hash.result:
  Updated results (after partition row count optimization changes)
mysql-test/suite/pbxt/r/partition_pruning.result:
  Updated results (after partition row count optimization changes)
mysql-test/suite/pbxt/r/partition_range.result:
  Updated results (after partition row count optimization changes)
mysql-test/suite/pbxt/r/subselect.result:
  Updated result after ROW() changes.
parent f900b658
disable_query_log; disable_query_log;
--require r/not_true.require --require r/not_true.require
select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB'; select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%' OR PLUGIN_DESCRIPTION LIKE '%xtradb%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
enable_query_log; enable_query_log;
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# #
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_not_innodb_plugin.inc
-- disable_query_log -- disable_query_log
-- disable_result_log -- disable_result_log
......
...@@ -37,7 +37,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -37,7 +37,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compressed row_format=COMPACT key_block_size=1
# Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT # Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
...@@ -50,7 +50,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -50,7 +50,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed KEY_BLOCK_SIZE=1 bug56632 Compressed key_block_size=1
ALTER TABLE bug56632 ROW_FORMAT=COMPACT; ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
SHOW CREATE TABLE bug56632; SHOW CREATE TABLE bug56632;
Table Create Table Table Create Table
...@@ -59,7 +59,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -59,7 +59,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed KEY_BLOCK_SIZE=1 bug56632 Compressed key_block_size=1
# Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE # Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ); CREATE TABLE bug56632 ( i INT );
...@@ -108,7 +108,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -108,7 +108,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compact row_format=COMPACT key_block_size=1
ALTER TABLE bug56632 ADD COLUMN f1 INT; ALTER TABLE bug56632 ADD COLUMN f1 INT;
Warnings: Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
...@@ -123,7 +123,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -123,7 +123,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compact row_format=COMPACT key_block_size=1
# Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE # Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT; CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
...@@ -147,7 +147,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -147,7 +147,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compressed row_format=COMPACT key_block_size=1
# Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT # Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
...@@ -160,7 +160,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -160,7 +160,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed KEY_BLOCK_SIZE=1 bug56632 Compressed key_block_size=1
ALTER TABLE bug56632 ROW_FORMAT=COMPACT; ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
Warnings: Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
...@@ -174,7 +174,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -174,7 +174,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compact row_format=COMPACT key_block_size=1
# Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE # Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ); CREATE TABLE bug56632 ( i INT );
...@@ -201,7 +201,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -201,7 +201,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 bug56632 Compact row_format=COMPACT key_block_size=1
# Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither. # Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
...@@ -217,7 +217,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -217,7 +217,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact KEY_BLOCK_SIZE=3 bug56632 Compact key_block_size=3
ALTER TABLE bug56632 ADD COLUMN f1 INT; ALTER TABLE bug56632 ADD COLUMN f1 INT;
Warnings: Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
...@@ -232,7 +232,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -232,7 +232,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact KEY_BLOCK_SIZE=3 bug56632 Compact key_block_size=3
# Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT. # Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
...@@ -248,7 +248,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -248,7 +248,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact KEY_BLOCK_SIZE=3 bug56632 Compact key_block_size=3
ALTER TABLE bug56632 ROW_FORMAT=COMPACT; ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
Warnings: Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
...@@ -262,7 +262,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -262,7 +262,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=3 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=3
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=3 bug56632 Compact row_format=COMPACT key_block_size=3
# Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1. # Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
...@@ -278,7 +278,7 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -278,7 +278,7 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compact KEY_BLOCK_SIZE=3 bug56632 Compact key_block_size=3
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
...@@ -289,6 +289,6 @@ bug56632 CREATE TABLE `bug56632` ( ...@@ -289,6 +289,6 @@ bug56632 CREATE TABLE `bug56632` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS TABLE_NAME ROW_FORMAT CREATE_OPTIONS
bug56632 Compressed KEY_BLOCK_SIZE=1 bug56632 Compressed key_block_size=1
# Cleanup # Cleanup
DROP TABLE IF EXISTS bug56632; DROP TABLE IF EXISTS bug56632;
...@@ -57,25 +57,25 @@ id select_type table partitions type possible_keys key key_len ref rows Extra ...@@ -57,25 +57,25 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
explain partitions select * from t1 where a is null or (a >= 5 and a <= 7); explain partitions select * from t1 where a is null or (a >= 5 and a <= 7);
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p2,p3 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0,p2,p3 ALL NULL NULL NULL NULL 7 Using where
explain partitions select * from t1 where a is null; explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
explain partitions select * from t1 where a is not null; explain partitions select * from t1 where a is not null;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
explain partitions select * from t1 where a >= 1 and a < 3; explain partitions select * from t1 where a >= 1 and a < 3;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 5 Using where
explain partitions select * from t1 where a >= 3 and a <= 5; explain partitions select * from t1 where a >= 3 and a <= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1,p2 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p1,p2 ALL NULL NULL NULL NULL 4 Using where
explain partitions select * from t1 where a > 2 and a < 4; explain partitions select * from t1 where a > 2 and a < 4;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a > 3 and a <= 6; explain partitions select * from t1 where a > 3 and a <= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 4 Using where
explain partitions select * from t1 where a > 5; explain partitions select * from t1 where a > 5;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where 1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
......
...@@ -21,19 +21,19 @@ select * from t1 where a > 1; ...@@ -21,19 +21,19 @@ select * from t1 where a > 1;
a a
explain partitions select * from t1 where a is null; explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t1 pnull ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a >= 0; explain partitions select * from t1 where a >= 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a < 0; explain partitions select * from t1 where a < 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t1 pnull ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a <= 0; explain partitions select * from t1 where a <= 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull,p0 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t1 pnull,p0 ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a > 1; explain partitions select * from t1 where a > 1;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
drop table t1; drop table t1;
create table t1 (a int unsigned, b int unsigned) create table t1 (a int unsigned, b int unsigned)
partition by range (a) partition by range (a)
...@@ -63,19 +63,19 @@ select * from t1 where a > 1; ...@@ -63,19 +63,19 @@ select * from t1 where a > 1;
a b a b
explain partitions select * from t1 where a is null; explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a >= 0; explain partitions select * from t1 where a >= 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1 ALL NULL NULL NULL NULL 4 Using where
explain partitions select * from t1 where a < 0; explain partitions select * from t1 where a < 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 2 Using where
explain partitions select * from t1 where a <= 0; explain partitions select * from t1 where a <= 0;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1 ALL NULL NULL NULL NULL 4 Using where
explain partitions select * from t1 where a > 1; explain partitions select * from t1 where a > 1;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
......
...@@ -922,7 +922,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t ...@@ -922,7 +922,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a) a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a)
1 1 a 1 1 a
2 0 b 2 0 b
NULL 0 NULL NULL NULL NULL
select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2; select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a) a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a)
1 0 a 1 0 a
...@@ -932,7 +932,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t ...@@ -932,7 +932,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a) a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a)
1 0 a 1 0 a
2 0 b 2 0 b
NULL 0 NULL NULL NULL NULL
drop table t1,t2; drop table t1,t2;
create table t1 (a int, b real, c varchar(10)); create table t1 (a int, b real, c varchar(10));
insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b'); insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment