mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18689 Simple query with extra brackets stopped working
Parenthesis around table names and derived tables should be allowed in FROM clauses and some other context as it was in earlier versions. Returned test queries that used such parenthesis in 10.3 to their original form. Adjusted test results accordingly.
This commit is contained in:
@ -1371,15 +1371,15 @@ SET @@global.slow_query_log= @old_slow_query_log;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (b int);
|
||||
CREATE TABLE t3 (c int);
|
||||
SELECT a FROM t1 UNION SELECT b FROM t2 JOIN t3 ON ( t2.b = t3.c );
|
||||
SELECT a FROM t1 UNION SELECT b FROM t2 JOIN (t3) ON ( t2.b = t3.c );
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
CREATE TABLE t1 (pk int NOT NULL);
|
||||
CREATE TABLE t2 (pk int NOT NULL, fk int NOT NULL);
|
||||
SELECT t1.pk FROM t1 LEFT JOIN t2 ON (t1.pk = t2.fk)
|
||||
SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk)
|
||||
UNION
|
||||
SELECT t1.pk FROM t1 LEFT JOIN t2 ON (t1.pk = t2.fk);
|
||||
SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk);
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
Reference in New Issue
Block a user