Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
None
Description
There is different sort order behavior regarding NULLS in MariaDB and Oracle.
In Oracle:
SELECT * from
|
(SELECT To_Date(NULL) bt FROM dual UNION ALL SELECT sysdate bt FROM DUAL)
|
ORDER BY bt
|
|
first not null rows retrieved.
In Maria;
SELECT * from
|
(SELECT CAST(\N AS DATETIME) bt FROM dual UNION ALL SELECT sysdate bt FROM DUAL)
|
ORDER BY bt
|
first null rows retrieved.
And also in analytic funkctions where "order by" used.
Is there some setting to change behavior to Oracle manner?
Is it possible to consider sql_mode=oracle?
Now developers are forced to alter application queries while porting from Oracle to Maria. So this is an additional obstacle.
Attachments
Issue Links
- duplicates
-
MDEV-22807 make NULLS LAST default when sql_mode=ORACLE
- Open