1
0
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:
Igor Babaev
2019-05-06 11:14:39 -07:00
parent b8259e4b59
commit fd386e39cd
23 changed files with 265 additions and 111 deletions

View File

@ -2034,14 +2034,14 @@ 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 );
a
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);
pk
DROP TABLE t1,t2;
create table t1 (a int);