mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
5.3 merge
This commit is contained in:
commit
44cf9ee5f7
52 changed files with 850 additions and 135 deletions
|
|
@ -1976,6 +1976,53 @@ Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
SET SESSION SQL_MODE=default;
|
||||
drop table t1;
|
||||
#
|
||||
# LP bug#967242 Wrong result (extra rows, not grouped) with JOIN, AND in ON condition, multi-part key, GROUP BY, OR in WHERE
|
||||
#
|
||||
CREATE TABLE t1 ( a VARCHAR(1) ) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('x');
|
||||
CREATE TABLE t2 ( b INT, c VARCHAR(1), KEY (c, b) ) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES
|
||||
(4, 'd'),(8, 'g'),(3, 'x'),(3, 'f'),
|
||||
(0, 'p'),(3, 'j'),(8, 'c');
|
||||
SELECT t2_1.b as zzz
|
||||
FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
|
||||
ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
|
||||
WHERE
|
||||
rand() + 1 > 0 OR
|
||||
a = t2_1.c
|
||||
GROUP BY zzz;
|
||||
zzz
|
||||
0
|
||||
3
|
||||
4
|
||||
8
|
||||
SELECT t2_1.b as zzz
|
||||
FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
|
||||
ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
|
||||
WHERE
|
||||
1 > 0 OR
|
||||
a = t2_1.c
|
||||
GROUP BY zzz;
|
||||
zzz
|
||||
0
|
||||
3
|
||||
4
|
||||
8
|
||||
SELECT t2_1.b as zzz
|
||||
FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
|
||||
ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
|
||||
WHERE
|
||||
t2_1.b + 1 > 0 OR
|
||||
a = t2_1.c
|
||||
GROUP BY zzz;
|
||||
zzz
|
||||
0
|
||||
3
|
||||
4
|
||||
8
|
||||
#TODO: in merge with 5.3 add original test suite
|
||||
drop table t1, t2;
|
||||
# End of 5.2 tests
|
||||
#
|
||||
# lp:872702: Crash in add_ref_to_table_cond() when grouping by a PK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue