Some basic datatypes and functions in oracle compatibility mode do not work (MDEV-19162)

[MDEV-20021] sql_mode="oracle" does not support MINUS set operator Created: 2019-07-10  Updated: 2021-05-20  Resolved: 2021-05-20

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: None
Fix Version/s: 10.6.1

Type: Technical task Priority: Major
Reporter: Faisal Saeed (Inactive) Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Compatibility

Attachments: File 10.6-minus.path    

 Description   

This is already available in MariaDB as "EXCEPT"

returns the Result of the query 1 that is not found in the result of query 2

MariaDB [world]> select * From City where id between 456 and 457 except select * from City where id=456;
+-----+------------+-------------+----------+------------+
| ID  | Name       | CountryCode | District | Population |
+-----+------------+-------------+----------+------------+
| 457 | Birmingham | GBR         | England  |    1013000 |
+-----+------------+-------------+----------+------------+

Oracle Doc: https://www.techonthenet.com/oracle/minus.php



 Comments   
Comment by Alexander Barkov [ 2019-09-10 ]

Faisal Is the task to support the MINUS keyword as a synonym to EXCEPT in this context?
Or does Oracle's MINUS work somehow differently from MariaDB EXCEPT?

Comment by Ian Gilfillan [ 2020-07-26 ]

Yes, a synonym, as Oracle's MINUS is the equivalent of EXCEPT [DISTINCT]

Comment by woqutech [ 2021-01-05 ]

the patch in attachment is mapping MINUS to EXCEPT, please review it. thanks!

Comment by Michael Widenius [ 2021-01-05 ]

Patch ok. Will add to my 10.6 tree

Generated at Thu Feb 08 08:56:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.