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

Prepared statement fails using JSON_OBJECT, UTF-8 value and null value

    XMLWordPrintable

Details

    Description

      Executing a prepared statement using JSON_OBJECT(), a UTF-8 value and a null value fails.

      CREATE TABLE bug_json_utf8 (
      id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
      var text COLLATE utf8mb4_unicode_ci);
      PREPARE stmt FROM "INSERT INTO bug_json_utf8 SET id = NULL, var = JSON_OBJECT('text1',?,'text2',?)";

      1. This fails with Incorrect string value: '\xE9", "t...' for column 'var' at row 1
        EXECUTE stmt USING 'café',null;
      1. These work :
        EXECUTE stmt USING 'café','café';
        EXECUTE stmt USING null,null;

      DEALLOCATE PREPARE stmt;

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            Bidibule Patrice Bulat
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.