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