You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mysql-test/r/having.result
+46-2Lines changed: 46 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -472,7 +472,7 @@ HAVING (table2.f2 = 8 AND table1.f1 >= 6);
472
472
id select_type table type possible_keys key key_len ref rows filtered Extra
473
473
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
474
474
Warnings:
475
-
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having (('7' = 8) and (`test`.`table1`.`f1` >= 6))
475
+
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
476
476
EXPLAIN EXTENDED
477
477
SELECT table1.f1, table2.f2
478
478
FROM t1 AS table1
@@ -483,6 +483,50 @@ HAVING (table2.f2 = 8);
483
483
id select_type table type possible_keys key key_len ref rows filtered Extra
484
484
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
485
485
Warnings:
486
-
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having ('7' = 8)
486
+
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
487
487
DROP TABLE t1;
488
+
#
489
+
# Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355
490
+
#
491
+
CREATE TABLE t1(f1 INT, f2 INT);
492
+
INSERT INTO t1 VALUES (10,8);
493
+
CREATE TABLE t2 (f1 INT);
494
+
INSERT INTO t2 VALUES (5);
495
+
SELECT COUNT(f1) FROM t2
496
+
HAVING (7, 9) IN (SELECT f1, MIN(f2) FROM t1);
497
+
COUNT(f1)
498
+
DROP TABLE t1, t2;
499
+
CREATE TABLE t1 (f1 INT, f2 VARCHAR(1));
500
+
INSERT INTO t1 VALUES (16,'f');
501
+
INSERT INTO t1 VALUES (16,'f');
502
+
CREATE TABLE t2 (f1 INT, f2 VARCHAR(1));
503
+
INSERT INTO t2 VALUES (13,'f');
504
+
INSERT INTO t2 VALUES (20,'f');
505
+
CREATE TABLE t3 (f1 INT, f2 VARCHAR(1));
506
+
INSERT INTO t3 VALUES (7,'f');
507
+
SELECT t1.f2 FROM t1
508
+
STRAIGHT_JOIN (t2 JOIN t3 ON t3.f2 = t2.f2 ) ON t3 .f2 = t2 .f2
509
+
HAVING ('v', 'i') NOT IN (SELECT f2, MIN(f2) FROM t1)
510
+
ORDER BY f2;
511
+
f2
512
+
f
513
+
f
514
+
f
515
+
f
516
+
DROP TABLES t1,t2,t3;
517
+
#
518
+
# Bug#52340 Segfault: read_cached_record (tab=0x94a2634) at sql_select.cc:14411
519
+
#
520
+
CREATE TABLE t1 (f1 INT, f2 VARCHAR(1));
521
+
INSERT INTO t1 VALUES (16,'d');
522
+
CREATE TABLE t2 (f1 INT, f2 VARCHAR(1));
523
+
INSERT INTO t2 VALUES (13,'e');
524
+
INSERT INTO t2 VALUES (20,'d');
525
+
SELECT MAX(t2.f2) FROM t2 JOIN t1 ON t1.f2
526
+
HAVING ('e' , 'd') IN
527
+
(SELECT ts1.f2, ts2.f2 FROM t2 ts1 JOIN t2 ts2 ON ts1.f1)
0 commit comments