~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/subselect3.test

  • Committer: Brian Aker
  • Date: 2008-07-05 17:02:05 UTC
  • Revision ID: brian@tangent.org-20080705170205-ezff9is4e7hpa3x2
Conversion of handler type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
insert into t3 values (NULL), (NULL);
57
57
flush status;
58
58
select a in (select max(ie) from t1 where oref=4 group by grp) from t3;
59
 
--replace_column 2 #
60
59
show status like 'Handler_read_rnd_next';
61
60
select ' ^ This must show 11' Z;
62
61
 
89
88
flush status;
90
89
select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
91
90
# This will only show access to t2:
92
 
--replace_column 2 #
93
91
show status like '%Handler_read_rnd_next';
94
92
 
95
93
# Check that repeated NULL-scans are not cached (subq. is not correlated):
98
96
 
99
97
flush status;
100
98
select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
101
 
--replace_column 2 #
102
99
show status like '%Handler_read%';
103
100
select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z;
104
101
 
303
300
 
304
301
select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
305
302
 
306
 
--sorted_result
307
303
select oref, a from t2 where a in (select ie from t1 where oref=t2.oref); 
308
304
 
309
305
select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
346
342
 
347
343
select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
348
344
 
349
 
--sorted_result
350
345
select oref, a from t2 where a in (select ie from t1 where oref=t2.oref); 
351
346
 
352
347
select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
359
354
 
360
355
select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
361
356
 
362
 
--sorted_result
363
357
select oref, a from t2 where a in (select ie from t1 where oref=t2.oref); 
364
358
 
365
359
select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
467
461
 
468
462
select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
469
463
 
470
 
--sorted_result
471
464
select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
472
465
 
473
466
select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
586
579
CREATE TABLE t1 (a INT NOT NULL);
587
580
INSERT INTO t1 VALUES (1),(-1), (65),(66);
588
581
 
589
 
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY);
 
582
CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
590
583
INSERT INTO t2 VALUES (65),(66);
591
584
 
592
585
SELECT a FROM t1 WHERE a NOT IN (65,66);