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

encode decode result data decay

    XMLWordPrintable

Details

    Description

      i use heidisql

      I have a big problem with using the encoding and decode built-in functions, so I'm posting a bug issue.
      Here is the query:

      ENCODE('ABC10','11')

      query result 0x4D5F10253F

      and this is value use decode function
      Here is the query
      cast(DECODE(0x4D5F10253F,'11') as char(14))

      but decode result value "ABC1?"

      I think the data is broken, but I do not know what the problem is.

      MariaDB [test]> show global variables like "c%";
      +--------------------------+----------------------------+
      | Variable_name            | Value                      |
      +--------------------------+----------------------------+
      | character_set_client     | latin1                     |
      | character_set_connection | latin1                     |
      | character_set_database   | latin1                     |
      | character_set_filesystem | binary                     |
      | character_set_results    | latin1                     |
      | character_set_server     | latin1                     |
      | character_set_system     | utf8                       |
      | character_sets_dir       | /usr/share/mysql/charsets/ |
      | collation_connection     | latin1_swedish_ci          |
      | collation_database       | latin1_swedish_ci          |
      | collation_server         | latin1_swedish_ci          |
      | completion_type          | NO_CHAIN                   |
      | concurrent_insert        | AUTO                       |
      | connect_timeout          | 10                         |
      +--------------------------+----------------------------+
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            cplus Eun SIk
            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.