diff options
author | Igor Babaev <igor@askmonty.org> | 2019-05-06 11:14:39 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-05-06 11:14:39 -0700 |
commit | fd386e39cd384cd738231c0c65f7d3dee4eac7c9 (patch) | |
tree | 2e473fab422de6a1bcb22acfd037aa1934625d6b /mysql-test/main/brackets.test | |
parent | b8259e4b599e0968ebe8c9ae11e8855f42b188f5 (diff) | |
download | mariadb-git-fd386e39cd384cd738231c0c65f7d3dee4eac7c9.tar.gz |
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.
Diffstat (limited to 'mysql-test/main/brackets.test')
-rw-r--r-- | mysql-test/main/brackets.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test index cf1dcc56acc..9ca86b87032 100644 --- a/mysql-test/main/brackets.test +++ b/mysql-test/main/brackets.test @@ -154,5 +154,27 @@ eval explain format=json $q; drop table t1; +--echo # +--echo # MDEV-18689: parenthesis around table names and derived tables +--echo # + +select * from ( mysql.db ); + +create table t1 (a int); +insert into t1 values (7), (2), (7); + +select * from (t1); +select * from ((t1)); +select * from (t1 t) where t.a > 5; +select * from ((t1 t)) where t.a > 5; + +select * from ((select a, sum(a) from t1 group by a) t); +select * from (((select a, sum(a) from t1 group by a) t)); + +update (t1 t) set t.a=t.a+1; +select * from t1; + +drop table t1; + --echo # End of 10.4 tests |