1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#
# MRR/MyISAM tests.
#
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
set read_rnd_buffer_size=79;
select @@read_rnd_buffer_size;
-- source include/mrr_tests.inc
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;
drop table t1, t2, t3, t4;
#
# BUG#30622: Incorrect query results for MRR + filesort
#
CREATE TABLE t1 (
ID int(10) unsigned NOT NULL AUTO_INCREMENT,
col1 int(10) unsigned DEFAULT NULL,
key1 int(10) unsigned NOT NULL DEFAULT '0',
key2 int(10) unsigned DEFAULT NULL,
text1 text,
text2 text,
col2 int(6) DEFAULT '100',
col3 enum('headers','bodyandsubject') NOT NULL DEFAULT 'bodyandsubject',
col4 int(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (ID),
KEY (key1),
KEY (key2)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(1,NULL,1130,NULL,'Hello',NULL,100,'bodyandsubject',0),
(2,NULL,1130,NULL,'bye',NULL,100,'bodyandsubject',0),
(3,NULL,1130,NULL,'red',NULL,100,'bodyandsubject',0),
(4,NULL,1130,NULL,'yellow',NULL,100,'bodyandsubject',0),
(5,NULL,1130,NULL,'blue',NULL,100,'bodyandsubject',0);
select * FROM t1 WHERE key1=1130 AND col1 IS NULL ORDER BY text1;
drop table t1;
|