~james-page/ubuntu/precise/mysql-5.5/misc-fixes

« back to all changes in this revision

Viewing changes to mysql-test/r/subselect_innodb.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-06-11 07:34:33 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120611073433-l9za2ni4ipp848y3
Tags: 5.5.24-0ubuntu0.12.04.1
* SECURITY UPDATE: Update to 5.5.24 to fix security issues (LP: #1011371)
  - http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
a       b
255
255
2011-05-13      0
256
256
DROP TABLE t1;
 
257
#
 
258
# Bug #11766300  59387: FAILING ASSERTION: CURSOR->POS_STATE == 1997660512 (BTR_PCUR_IS_POSITIONE
 
259
#
 
260
CREATE TABLE t1 (a INT) ENGINE=INNODB;
 
261
INSERT INTO t1 VALUES (0);
 
262
CREATE TABLE t2 (d BINARY(2), PRIMARY KEY (d(1)), UNIQUE KEY (d)) ENGINE=INNODB;
 
263
SELECT 1 FROM t1 WHERE NOT EXISTS
 
264
(SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d);
 
265
1
 
266
1
 
267
EXPLAIN SELECT 1 FROM t1 WHERE NOT EXISTS
 
268
(SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d);
 
269
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
270
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       Using where
 
271
2       DEPENDENT SUBQUERY      t2      eq_ref  PRIMARY,d       d       2       func    1       Using where
 
272
3       DEPENDENT SUBQUERY      t2      index   NULL    d       2       NULL    1       Using where; Using index
 
273
DROP TABLE t2;
 
274
CREATE TABLE t2 (b INT, c INT, UNIQUE KEY (b), UNIQUE KEY (b, c )) ENGINE=INNODB;
 
275
INSERT INTO t2 VALUES (1, 1);
 
276
SELECT 1 FROM t1
 
277
WHERE a != (SELECT 1 FROM t2 WHERE a <=> b OR a > '' AND 6 = 7 ORDER BY b, c);
 
278
1
 
279
DROP TABLE t1, t2;
 
280
#
 
281
# Bug #13639204 64111: CRASH ON SELECT SUBQUERY WITH NON UNIQUE
 
282
# INDEX
 
283
#
 
284
CREATE TABLE t1 (
 
285
id int
 
286
) ENGINE=InnoDB;
 
287
INSERT INTO t1 (id) VALUES (11);
 
288
CREATE TABLE t2 (
 
289
t1_id int,
 
290
position int,
 
291
KEY t1_id (t1_id),
 
292
KEY t1_id_position (t1_id,position)
 
293
) ENGINE=InnoDB;
 
294
EXPLAIN SELECT
 
295
(SELECT position FROM t2
 
296
WHERE t2.t1_id = t1.id
 
297
ORDER BY t2.t1_id , t2.position
 
298
LIMIT 10,1
 
299
) AS maxkey
 
300
FROM t1
 
301
LIMIT 1;
 
302
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
303
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       
 
304
2       DEPENDENT SUBQUERY      t2      ref     t1_id,t1_id_position    t1_id_position  5       test.t1.id      1       Using where
 
305
SELECT
 
306
(SELECT position FROM t2
 
307
WHERE t2.t1_id = t1.id
 
308
ORDER BY t2.t1_id , t2.position
 
309
LIMIT 10,1
 
310
) AS maxkey
 
311
FROM t1
 
312
LIMIT 1;
 
313
maxkey
 
314
NULL
 
315
DROP TABLE t1,t2;
 
316
End of 5.1 tests