Details
-
New Feature
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
Description
This testcase uses oracle and MariaDB compatible SQL (the first line gives an auto-ignored error on oracle, and succeeds on MariaDB, to align instances in operation).
SET autocommit=0, sql_mode='ORACLE'; |
CREATE TABLE t (c VARCHAR(5)); |
INSERT INTO t (c) VALUES ('RIGHT'); |
UPDATE t SET c='LEFT RIGHT'; |
SELECT * FROM t; |
Leads to, on oracle:
oracle |
SQL> SELECT * FROM t;
|
C
|
-----
|
RIGHT
|
Versus MariaDB:
MDEV-35915-6 CS 12.2.0 ed3c63488a1613377d92ee3ade3fe6870e39b4db (Optimized, Clang 21.1.0-20250811) Build 24/09/2025 |
12.2.0-opt>SELECT * FROM t;
|
+-------+
|
| c |
|
+-------+
|
| LEFT |
|
+-------+
|
1 row in set (0.000 sec)
|
The reason is clear:
oracle |
SQL> UPDATE t SET c='LEFT RIGHT'
|
*
|
ERROR at line 1:
|
ORA-12899: value too large for column "SYS"."T"."C" (actual: 10, maximum: 5)
|
Help: https://docs.oracle.com/error-help/db/ora-12899/
|
Whereas on MariaDB we see:
MDEV-35915-6 CS 12.2.0 ed3c63488a1613377d92ee3ade3fe6870e39b4db (Optimized, Clang 21.1.0-20250811) Build 24/09/2025 |
12.2.0-opt>UPDATE t SET c='LEFT RIGHT';
|
Query OK, 0 rows affected, 1 warning (0.000 sec)
|
Rows matched: 1 Changed: 0 Warnings: 1
|
 |
12.2.0-opt>SHOW WARNINGS;
|
+---------+------+----------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------+
|
| Warning | 1265 | Data truncated for column 'c' at row 1 |
|
+---------+------+----------------------------------------+
|
1 row in set (0.000 sec)
|
Goal: achieve indentical results with oracle for indentical SQL on both sides when using sql_mode='ORACLE'.
Attachments
Issue Links
- is part of
-
MDEV-35973 Oracle Compatibility Project 1 for 2025
-
- Stalled
-