Skip to content
/ server Public
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions include/heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,27 @@ typedef struct st_hp_keydef /* Key definition with open */
uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
} HP_KEYDEF;

typedef struct st_hp_blob_desc
{
uint offset; /* Byte offset of blob descriptor within record buffer */
uint packlength; /* 1, 2, 3, or 4: length prefix size */
} HP_BLOB_DESC;

typedef struct st_heap_share
{
HP_BLOCK block;
HP_KEYDEF *keydef;
ulonglong data_length,index_length,max_table_size;
ulonglong auto_increment;
ulong min_records,max_records; /* Params to open */
ulong records; /* records */
ulong records; /* Logical (primary) record count */
ulong blength; /* records rounded up to 2^n */
ulong deleted; /* Deleted records in database */
uint key_stat_version; /* version to indicate insert/delete */
uint key_version; /* Updated on key change */
uint file_version; /* Update on clear */
uint reclength; /* Length of one record */
uint visible; /* Offset to the visible/deleted mark */
uint visible; /* Offset to the flags byte (active/deleted/continuation) */
uint changed;
uint keys,max_key_length;
uint currently_disabled_keys; /* saved value from "keys" when disabled */
Expand All @@ -156,6 +162,9 @@ typedef struct st_heap_share
THR_LOCK lock;
my_bool delete_on_close;
my_bool internal; /* Internal temporary table */
HP_BLOB_DESC *blob_descs; /* Array of blob column descriptors */
uint blob_count; /* Number of blob columns */
ulong total_records; /* All active records (primary + blob continuation) */
LIST open_list;
uint auto_key;
uint auto_key_type; /* real type of the auto key segment */
Expand All @@ -181,6 +190,9 @@ typedef struct st_heap_info
uint file_version; /* Version at scan */
uint lastkey_len;
my_bool implicit_emptied;
uchar *blob_buff; /* Reassembly buffer for blob reads */
uint32 blob_buff_len; /* Current allocated size of blob_buff */
my_bool has_zerocopy_blobs; /* Last hp_read_blobs produced zero-copy ptrs */
THR_LOCK_DATA lock;
LIST open_list;
} HP_INFO;
Expand All @@ -204,6 +216,8 @@ typedef struct st_heap_create_info
open_count to 1. Is only looked at if not internal_table.
*/
my_bool pin_share;
HP_BLOB_DESC *blob_descs;
uint blob_count;
} HP_CREATE_INFO;

/* Prototypes for heap-functions */
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/mtr_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BEGIN
collation_name, column_type, column_key, extra, column_comment
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_schema='mysql'
ORDER BY columns_in_mysql;
ORDER BY columns_in_mysql, ordinal_position;

-- Dump all events, there should be none
SELECT * FROM INFORMATION_SCHEMA.EVENTS;
Expand Down
29 changes: 29 additions & 0 deletions mysql-test/main/blob_sj_test.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
set @blob_len = 16;
set @prefix_len = 6;
set @suffix_len = @blob_len - @prefix_len;
create table t1 (a1 blob(16), a2 blob(16));
create table t2 (b1 blob(16), b2 blob(16));
insert into t1 values
(concat('1 - 00', repeat('x', @suffix_len)), concat('2 - 00', repeat('x', @suffix_len)));
insert into t1 values
(concat('1 - 01', repeat('x', @suffix_len)), concat('2 - 01', repeat('x', @suffix_len)));
insert into t1 values
(concat('1 - 02', repeat('x', @suffix_len)), concat('2 - 02', repeat('x', @suffix_len)));
insert into t2 values
(concat('1 - 01', repeat('x', @suffix_len)), concat('2 - 01', repeat('x', @suffix_len)));
insert into t2 values
(concat('1 - 02', repeat('x', @suffix_len)), concat('2 - 02', repeat('x', @suffix_len)));
insert into t2 values
(concat('1 - 03', repeat('x', @suffix_len)), concat('2 - 03', repeat('x', @suffix_len)));
explain extended select left(a1,7), left(a2,7) from t1 where a1 in (select b1 from t2 where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select left(`test`.`t1`.`a1`,7) AS `left(a1,7)`,left(`test`.`t1`.`a2`,7) AS `left(a2,7)` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,<exists>(/* select#2 */ select `test`.`t2`.`b1` from `test`.`t2` where `test`.`t2`.`b1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1`)))
select left(a1,7), left(a2,7) from t1 where a1 in (select b1 from t2 where b1 > '0');
left(a1,7) left(a2,7)
1 - 01x 2 - 01x
1 - 02x 2 - 02x
drop table t1, t2;
26 changes: 26 additions & 0 deletions mysql-test/main/blob_sj_test.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
set @blob_len = 16;
set @prefix_len = 6;
set @suffix_len = @blob_len - @prefix_len;

create table t1 (a1 blob(16), a2 blob(16));
create table t2 (b1 blob(16), b2 blob(16));

insert into t1 values
(concat('1 - 00', repeat('x', @suffix_len)), concat('2 - 00', repeat('x', @suffix_len)));
insert into t1 values
(concat('1 - 01', repeat('x', @suffix_len)), concat('2 - 01', repeat('x', @suffix_len)));
insert into t1 values
(concat('1 - 02', repeat('x', @suffix_len)), concat('2 - 02', repeat('x', @suffix_len)));

insert into t2 values
(concat('1 - 01', repeat('x', @suffix_len)), concat('2 - 01', repeat('x', @suffix_len)));
insert into t2 values
(concat('1 - 02', repeat('x', @suffix_len)), concat('2 - 02', repeat('x', @suffix_len)));
insert into t2 values
(concat('1 - 03', repeat('x', @suffix_len)), concat('2 - 03', repeat('x', @suffix_len)));

explain extended select left(a1,7), left(a2,7) from t1 where a1 in (select b1 from t2 where b1 > '0');
select left(a1,7), left(a2,7) from t1 where a1 in (select b1 from t2 where b1 > '0');

drop table t1, t2;
9 changes: 3 additions & 6 deletions mysql-test/main/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ Note 1051 Unknown table 'test.t1,test.t2'
create table t1 (b char(0) not null, index(b));
ERROR 42000: The storage engine MyISAM can't index column `b`
create table t1 (a int not null,b text) engine=heap;
ERROR 42000: Storage engine MEMORY doesn't support BLOB/TEXT columns
drop table if exists t1;
Warnings:
Note 1051 Unknown table 'test.t1'
drop table t1;
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
create table not_existing_database.test (a int);
Expand Down Expand Up @@ -1089,7 +1086,7 @@ t1 CREATE TABLE `t1` (
`QUERY_ID` bigint(4) NOT NULL,
`INFO_BINARY` blob,
`TID` bigint(4) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
drop table t1;
create temporary table t1 like information_schema.processlist;
show create table t1;
Expand All @@ -1113,7 +1110,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
`QUERY_ID` bigint(4) NOT NULL,
`INFO_BINARY` blob,
`TID` bigint(4) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
drop table t1;
create table t1 like information_schema.character_sets;
show create table t1;
Expand Down
3 changes: 1 addition & 2 deletions mysql-test/main/create.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ create table t2 select auto+1 from t1;
drop table if exists t1,t2;
--error ER_WRONG_KEY_COLUMN
create table t1 (b char(0) not null, index(b));
--error ER_TABLE_CANT_HANDLE_BLOB
create table t1 (a int not null,b text) engine=heap;
drop table if exists t1;
drop table t1;

--error ER_WRONG_AUTO_KEY
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/cte_recursive.test
Original file line number Diff line number Diff line change
Expand Up @@ -3212,6 +3212,8 @@ show create table t2;
--eval insert ignore into t2 $query;
drop table t2;
set @@sql_mode="";
# Rows with identical (level, mid) due to overflow have non-deterministic order
--sorted_result
--eval $query
--eval create table t2 as $query;
show create table t2;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/derived_view.result
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ GROUP BY TABLE_SCHEMA) AS UNIQUES
ON ( COLUMNS.TABLE_SCHEMA = UNIQUES.TABLE_SCHEMA);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY COLUMNS ALL NULL NULL NULL NULL NULL Open_frm_only; Scanned all databases
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
1 PRIMARY <derived2> ref key0 key0 194 information_schema.COLUMNS.TABLE_SCHEMA 2
2 DERIVED STATISTICS ALL NULL NULL NULL NULL NULL Open_frm_only; Scanned all databases; Using filesort
SELECT COUNT(*) > 0
FROM INFORMATION_SCHEMA.COLUMNS
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/distinct.result
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
if(sum(a), b, 0)
Aa123456
SOME_B_VALUE
drop table t1;
#
# end of 10.5 tests
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/main/distinct.test
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,9 @@ create table t1 (a int, b longtext, c varchar(18));
insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');

# ROLLUP row's b value is indeterminate (depends on last group processed),
# which varies by temp table engine (HEAP vs Aria). Mask the value.
--replace_regex /(Aa123456|Bb7897777|Cc01287|d12345)/SOME_B_VALUE/
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
drop table t1;

Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/group_by.result
Original file line number Diff line number Diff line change
Expand Up @@ -2510,10 +2510,10 @@ SELECT f3, MIN(f2) FROM t1 GROUP BY f1 LIMIT 1;
f3 MIN(f2)
blob NULL
DROP TABLE t1;
the value below *must* be 1
the value below *must* be 0 (HEAP supports blobs)
show status like 'Created_tmp_disk_tables';
Variable_name Value
Created_tmp_disk_tables 1
Created_tmp_disk_tables 0
#
# Bug #1002146: Unneeded filesort if usage of join buffer is not allowed
# (bug mdev-645)
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/group_by.test
Original file line number Diff line number Diff line change
Expand Up @@ -1671,14 +1671,14 @@ DROP TABLE t1, t2;
--disable_ps2_protocol
--disable_view_protocol
--disable_cursor_protocol
FLUSH STATUS; # this test case *must* use Aria temp tables
FLUSH STATUS;

CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob);
INSERT INTO t1 values(11,NULL,'blob'),(11,NULL,'blob');
SELECT f3, MIN(f2) FROM t1 GROUP BY f1 LIMIT 1;
DROP TABLE t1;

--echo the value below *must* be 1
--echo the value below *must* be 0 (HEAP supports blobs)
show status like 'Created_tmp_disk_tables';
--enable_cursor_protocol
--enable_view_protocol
Expand Down
8 changes: 4 additions & 4 deletions mysql-test/main/group_min_max_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ CREATE TABLE t2 (`voter_id` int(10) unsigned NOT NULL DEFAULT '0',
insert into t2 values (1,repeat("a",1000)),(2,repeat("a",1000)),(3,repeat("b",1000)),(4,repeat("c",1000)),(4,repeat("b",1000));
SELECT GROUP_CONCAT(t1.language_id SEPARATOR ',') AS `translation_resources`, `d`.`serialized_c` FROM t2 AS `d` LEFT JOIN t1 ON `d`.`voter_id` = t1.`voter_id` GROUP BY `d`.`voter_id` ORDER BY 10-d.voter_id+RAND()*0;
translation_resources serialized_c
NULL cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
NULL bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
NULL #
NULL #
NULL #
NULL #
drop table t1,t2;
#
# MDEV-30143: Segfault on select query using index for group-by and filesort
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/group_min_max_innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ CREATE TABLE t1 (`voter_id` int(11) unsigned NOT NULL,
CREATE TABLE t2 (`voter_id` int(10) unsigned NOT NULL DEFAULT '0',
`serialized_c` mediumblob) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into t2 values (1,repeat("a",1000)),(2,repeat("a",1000)),(3,repeat("b",1000)),(4,repeat("c",1000)),(4,repeat("b",1000));
--replace_column 2 #
SELECT GROUP_CONCAT(t1.language_id SEPARATOR ',') AS `translation_resources`, `d`.`serialized_c` FROM t2 AS `d` LEFT JOIN t1 ON `d`.`voter_id` = t1.`voter_id` GROUP BY `d`.`voter_id` ORDER BY 10-d.voter_id+RAND()*0;
drop table t1,t2;

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/information_schema.result
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ select TABLE_NAME,TABLE_TYPE,ENGINE
from information_schema.tables
where table_schema='information_schema' limit 2;
TABLE_NAME TABLE_TYPE ENGINE
ALL_PLUGINS SYSTEM VIEW Aria
ALL_PLUGINS SYSTEM VIEW MEMORY
APPLICABLE_ROLES SYSTEM VIEW MEMORY
show tables from information_schema like "T%";
Tables_in_information_schema (T%)
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/information_schema_parameters.result
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PARAMETERS CREATE TEMPORARY TABLE `PARAMETERS` (
`COLLATION_NAME` varchar(64),
`DTD_IDENTIFIER` longtext NOT NULL,
`ROUTINE_TYPE` varchar(9) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = 'parameters'
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/information_schema_part.result
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ partition x2 values less than (5)
( subpartition x21 tablespace t1,
subpartition x22 tablespace t2)
);
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name;
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name, subpartition_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/information_schema_part.test
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ subpartition by key (a)
subpartition x22 tablespace t2)
);
--replace_column 16 # 19 # 20 #
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name;
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name, subpartition_name;
drop table t1,t2;

create table t1 (
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/information_schema_routines.result
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL,
`COLLATION_CONNECTION` varchar(64) NOT NULL,
`DATABASE_COLLATION` varchar(64) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = 'routines'
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/main/intersect_all.result
Original file line number Diff line number Diff line change
Expand Up @@ -718,13 +718,13 @@ t4 CREATE TABLE `t4` (
drop tables t4;
(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
a b
4 4
2 2
2 2
4 4
(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);
a b
4 4
2 2
4 4
drop tables t1,t2,t3;
create table t1 (a int, b int);
create table t2 (c int, d int);
Expand Down Expand Up @@ -779,9 +779,9 @@ insert into t3 values (3,3);
e f
3 3
3 3
4 4
5 5
6 6
4 4
explain extended (select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/main/intersect_all.test
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ show create table t4;
drop tables t4;


--sorted_result
(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);

--sorted_result
(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);

drop tables t1,t2,t3;
Expand Down Expand Up @@ -149,6 +151,7 @@ explain extended (select a,b from t1) union all (select c,d from t2) intersect a
insert into t2 values (3,3);
insert into t3 values (3,3);

--sorted_result
(select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
explain extended (select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);

Expand Down
Loading