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

Wrong function name in ER_JSON_PATH_NO_WILDCARD error message for JSON_REPLACE

Details

    Description

      10.5 1b12e251

      MariaDB [test]> SELECT JSON_REPLACE('{"a":"b"}','$.*','c');
      +-------------------------------------+
      | JSON_REPLACE('{"a":"b"}','$.*','c') |
      +-------------------------------------+
      | NULL                                |
      +-------------------------------------+
      1 row in set, 1 warning (0.000 sec)
       
      MariaDB [test]> SHOW WARNINGS;
      +---------+------+----------------------------------------------------------------------------+
      | Level   | Code | Message                                                                    |
      +---------+------+----------------------------------------------------------------------------+
      | Warning | 4044 | Wildcards in JSON path not allowed in argument 2 to function 'json_update' |
      +---------+------+----------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

      There is no function json_update.

      Attachments

        Activity

          holyfoot FYI, the patch for MDEV-24523 (MariaDB/server/pull/1841) also fixes the present issue, but the patch only applied to 10.3 or later.

          MariaDB [(none)]> SELECT JSON_REPLACE('{"a":"b"}','$.*','c');
          +-------------------------------------+
          | JSON_REPLACE('{"a":"b"}','$.*','c') |
          +-------------------------------------+
          | NULL                                |
          +-------------------------------------+
          1 row in set, 1 warning (0.001 sec)
           
          MariaDB [(none)]> show warnings;
          +---------+------+-----------------------------------------------------------------------------+
          | Level   | Code | Message                                                                     |
          +---------+------+-----------------------------------------------------------------------------+
          | Warning | 4044 | Wildcards in JSON path not allowed in argument 2 to function 'json_replace' |
          +---------+------+-----------------------------------------------------------------------------+
          1 row in set (0.000 sec)
          

          nayuta-yanagisawa Nayuta Yanagisawa (Inactive) added a comment - holyfoot FYI, the patch for MDEV-24523 ( MariaDB/server/pull/1841 ) also fixes the present issue, but the patch only applied to 10.3 or later. MariaDB [(none)]> SELECT JSON_REPLACE( '{"a":"b"}' , '$.*' , 'c' ); + -------------------------------------+ | JSON_REPLACE( '{"a":"b"}' , '$.*' , 'c' ) | + -------------------------------------+ | NULL | + -------------------------------------+ 1 row in set , 1 warning (0.001 sec)   MariaDB [(none)]> show warnings; + ---------+------+-----------------------------------------------------------------------------+ | Level | Code | Message | + ---------+------+-----------------------------------------------------------------------------+ | Warning | 4044 | Wildcards in JSON path not allowed in argument 2 to function 'json_replace' | + ---------+------+-----------------------------------------------------------------------------+ 1 row in set (0.000 sec)
          rucha174 Rucha Deodhar added a comment -

          Already fixed.

          rucha174 Rucha Deodhar added a comment - Already fixed.

          People

            rucha174 Rucha Deodhar
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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