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

mroonga_command() incorrect result length metadata

    XMLWordPrintable

Details

    Description

      mroonga_command() UDF does not set init->max_length, so the server, not knowing any better, uses max_length of the argument. Result:

      mroonga/storage.create_table_index_flags_invalid w6 [ fail ]
              Test ended at 2026-04-29 14:00:51
       
      CURRENT_TEST: mroonga/storage.create_table_index_flags_invalid
      --- storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_invalid.result
      +++ storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_invalid.reject
      @@ -9,5 +9,5 @@
       Warning	16508	The index flag 'COMPRESS_ZSTD' is invalid. It is ignored
       SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
       mroonga_command("dump --dump_plugins no --dump_schema no")
      -column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content
      +column_create memos#content index COLUM
       DROP TABLE memos;
      

      because argument's length is 39 and the actual result length is 74. But the server tells the client that the max result length is 39. Test fails in --cursor and in --view that actually use max result length.

      Also (I didn't tryi, but think) this will show in, like

      CREATE t1 AS SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
      

      or even simply (I did try that):

      --enable_metadata
       SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
      

      Attachments

        Issue Links

          Activity

            People

              kou Kouhei Sutou
              serg Sergei Golubchik
              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.