[MDEV-22808] Oracle Mode should result into .1 rather than 0.1 for value 0.1 with SELECT statement Created: 2020-06-05  Updated: 2021-12-10

Status: Open
Project: MariaDB Server
Component/s: Server
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Pramod Mahto Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Compatibility, Oracle


 Description   

Select numbers in MariaDB SQL_MODE=ORACLE is not like Oracle resulting into 0.1 instead of .1

In Oracle

select 0.1 as value from dual;
 
+------+
|value |
+------+
|   .1 |
+------+
 
select 00000000000.1 as value from dual;
 
+------+
|value |
+------+
|   .1 |
+------+

While in MariaDB with in Oracle mode

MariaDB [(none)]> select @@sql_mode;
+----------------------------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                                                                   |
+----------------------------------------------------------------------------------------------------------------------------------------------+
| PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT |
+----------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]> select 0.1 as value from dual;
+-------+
| value |
+-------+
|   0.1 |
+-------+
 
MariaDB [(none)]> select 00000000000.1 as value from dual;
+-------+
| value |
+-------+
|   0.1 |
+-------+
1 row in set (0.001 sec)


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