Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22808

Oracle Mode should result into .1 rather than 0.1 for value 0.1 with SELECT statement

    XMLWordPrintable

Details

    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)
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pramod.mahto@mariadb.com Pramod Mahto
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.