mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -452,4 +452,46 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-18689: parenthesis around table names and derived tables
|
||||
#
|
||||
select * from ( mysql.db );
|
||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
|
||||
% test Y Y Y Y Y Y N Y Y Y Y Y Y Y Y N N Y Y Y
|
||||
% test\_% Y Y Y Y Y Y N Y Y Y Y Y Y Y Y N N Y Y Y
|
||||
create table t1 (a int);
|
||||
insert into t1 values (7), (2), (7);
|
||||
select * from (t1);
|
||||
a
|
||||
7
|
||||
2
|
||||
7
|
||||
select * from ((t1));
|
||||
a
|
||||
7
|
||||
2
|
||||
7
|
||||
select * from (t1 t) where t.a > 5;
|
||||
a
|
||||
7
|
||||
7
|
||||
select * from ((t1 t)) where t.a > 5;
|
||||
a
|
||||
7
|
||||
7
|
||||
select * from ((select a, sum(a) from t1 group by a) t);
|
||||
a sum(a)
|
||||
2 2
|
||||
7 14
|
||||
select * from (((select a, sum(a) from t1 group by a) t));
|
||||
a sum(a)
|
||||
2 2
|
||||
7 14
|
||||
update (t1 t) set t.a=t.a+1;
|
||||
select * from t1;
|
||||
a
|
||||
8
|
||||
3
|
||||
8
|
||||
drop table t1;
|
||||
# End of 10.4 tests
|
||||
|
Reference in New Issue
Block a user