mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#8733 - server accepts malformed query (multiply mentioned distinct)
Detect conflicting options in SELECT
This commit is contained in:
@@ -2445,3 +2445,13 @@ cast((a - b) as unsigned)
|
||||
1
|
||||
18446744073709551615
|
||||
drop table t1;
|
||||
create table t1 (a int(11));
|
||||
select all all * from t1;
|
||||
a
|
||||
select distinct distinct * from t1;
|
||||
a
|
||||
select all distinct * from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'distinct * from t1' at line 1
|
||||
select distinct all * from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'all * from t1' at line 1
|
||||
drop table t1;
|
||||
|
||||
@@ -1979,3 +1979,19 @@ select a-b , (a-b < 0) from t1 order by 1;
|
||||
select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
|
||||
select cast((a - b) as unsigned) from t1 order by 1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# Bug#8733 server accepts malformed query (multiply mentioned distinct)
|
||||
#
|
||||
create table t1 (a int(11));
|
||||
select all all * from t1;
|
||||
select distinct distinct * from t1;
|
||||
--error 1064
|
||||
select all distinct * from t1;
|
||||
--error 1064
|
||||
select distinct all * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user