mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-12086 sql_mode=ORACLE: allow SELECT UNIQUE as a synonym for SELECT DISTINCT
This commit is contained in:
12
mysql-test/suite/compat/oracle/r/misc.result
Normal file
12
mysql-test/suite/compat/oracle/r/misc.result
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
SET sql_mode=ORACLE;
|
||||||
|
#
|
||||||
|
# MDEV-12086 sql_mode=ORACLE: allow SELECT UNIQUE as a synonym for SELECT DISTINCT
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (10),(20),(20),(30),(30),(30);
|
||||||
|
SELECT UNIQUE a FROM t1;
|
||||||
|
a
|
||||||
|
10
|
||||||
|
20
|
||||||
|
30
|
||||||
|
DROP TABLE t1;
|
10
mysql-test/suite/compat/oracle/t/misc.test
Normal file
10
mysql-test/suite/compat/oracle/t/misc.test
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
SET sql_mode=ORACLE;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-12086 sql_mode=ORACLE: allow SELECT UNIQUE as a synonym for SELECT DISTINCT
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (10),(20),(20),(30),(30),(30);
|
||||||
|
SELECT UNIQUE a FROM t1;
|
||||||
|
DROP TABLE t1;
|
@ -16194,6 +16194,7 @@ query_expression_option:
|
|||||||
Select->options|= SELECT_HIGH_PRIORITY;
|
Select->options|= SELECT_HIGH_PRIORITY;
|
||||||
}
|
}
|
||||||
| DISTINCT { Select->options|= SELECT_DISTINCT; }
|
| DISTINCT { Select->options|= SELECT_DISTINCT; }
|
||||||
|
| UNIQUE_SYM { Select->options|= SELECT_DISTINCT; }
|
||||||
| SQL_SMALL_RESULT { Select->options|= SELECT_SMALL_RESULT; }
|
| SQL_SMALL_RESULT { Select->options|= SELECT_SMALL_RESULT; }
|
||||||
| SQL_BIG_RESULT { Select->options|= SELECT_BIG_RESULT; }
|
| SQL_BIG_RESULT { Select->options|= SELECT_BIG_RESULT; }
|
||||||
| SQL_BUFFER_RESULT
|
| SQL_BUFFER_RESULT
|
||||||
|
Reference in New Issue
Block a user