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

mysqltest: TRIM(NULL) Returns Empty String Instead of NULL

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6.24
    • 10.6
    • OTHER
    • None

    Description

      In mysqltest, the TRIM(NULL) expression returns an empty string ('') instead of NULL. This behavior is incorrect and inconsistent with how MySQL server evaluates TRIM(NULL).

      Test Case:

      let $tt1 = $(trim(null));
      -- echo trim(null) -> $tt1;           
      

      mysqltest output:

      worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029
      trim(null) -> ;                
      main.trim1                               [ pass ]    
      

      server output :

      MariaDB [(none)]> select trim(null);
      +------------+
      | trim(null) |
      +------------+
      | NULL       |
      +------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              poojalamba16 Pooja Rani Lamba
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.