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

CONCAT behavior that need to double check

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.11.10
    • N/A
    • None
    • Windows 11 64

    Description

      Hi. This issue reported as a related issue to the all the crashs from me.
      At first glance, you may think that a stack overflow type question, but listen.

      There is a code line in a stored_procedure which called by event/timer.

      DO _udf_func_dummy(CONCAT('가나다 가 나 다 abcdefg가나다 가나다 가나다. AAA 가나다가나다가나다가나다가나다. 99가나다 가나다 가나다.\n\n', 0));
      

      And focus on the concat line
      CONCAT('가나다 가 나 다 abcdefg가나다 가나다 가나다. AAA 가나다가나다가나다가나다가나다. 99가나다 가나다 가나다.\n\n', 0)
      when you execute this line by 'do' or 'select' yourself, you may see an error message which is weird.
      Since the string has double '\n' for purpose. But it spit an weried error.
      When we only change from '\n' to '\r\n' it disappers(have no idea windows specific behavior or not).

      So my question is,
      1. doesn't the double '\n\n' make any internal memory buffer run? any single byte? that by internal 'sprintf' or equivalant stuff?
      2. Or between unicode, cpc949, utf-8 conversion may involves to produce memory overun.
      (that is why put all the charactors)

      If yes(hopefully),
      need to be fixed
      and all the crash related issues from me can be closed with a patch for this issue.

      What do you think?

      config

      [mysqld]
      character_set_server=utf8mb4
      init-connect=SET collation_connection='utf8mb4_unicode_ci'
       
      [mysqldump]
      default-character-set=utf8mb4
       
      [client]
      default-character-set=utf8mb4
      

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          22 kB
        2. test_utf_8_dos_style.sql
          0.2 kB
        3. test_utf_8.sql
          0.2 kB

        Activity

          People

            Unassigned Unassigned
            npdmailing@gmail.com Mitchell Lee
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.