XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3
    • Fix Version/s: 10.3.3
    • Component/s: Parser
    • Labels:
      None
    • Sprint:
      10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

      Description

      In order to emulate Oracle's behavior in handling empty strings as NULL, we'll add a new sql_mode flag EMPTY_STRING_IS_NULL.
      When this flag is set, we will:

      • translate Item_string created in the parser to Item_null
      • translate binding an empty string as prepared statement parameters to binding NULL

      Note, more NULL handling flags will be added later under terms of separate patch:

      • translating empty strings in function return values to NULL
      • handling empty strings as equal to NULL in comparison operators

      This task is only about literals and PS parameters.

      The new flag will be disabled by default.
      The new flag will NOT be a part of sql_mode=ORACLE.

      In order to activate this behavior, one will have to do:

      SET sql_mode='ORACLE,EMPTY_STRING_IS_NULL';
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: