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

Weird hex warnings

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 5.5.37, 10.0.10
    • 5.5.38, 10.0.11
    • None
    • None

    Description

      The first syntax is ok, the latter 2 issue warnings:

      MariaDB [(none)]> \W
      Show warnings enabled.
      MariaDB [(none)]> SELECT CAST(0xAA AS UNSIGNED), CAST(x'aa' AS UNSIGNED), CAST(X'aa' AS UNSIGNED);
      +------------------------+-------------------------+-------------------------+
      | CAST(0xAA AS UNSIGNED) | CAST(x'aa' AS UNSIGNED) | CAST(X'aa' AS UNSIGNED) |
      +------------------------+-------------------------+-------------------------+
      |                    170 |                       0 |                       0 |
      +------------------------+-------------------------+-------------------------+
      1 row in set, 2 warnings (0.00 sec)
       
      Warning (Code 1292): Truncated incorrect INTEGER value: '\xAA'
      Warning (Code 1292): Truncated incorrect INTEGER value: '\xAA'

      But based on MySQL docs, these syntaxes should be equivalent:
      https://dev.mysql.com/doc/refman/5.6/en/hexadecimal-literals.html

      Sorry, I didn't try this on MySQL or on older Maria versions.

      Attachments

        Issue Links

          Activity

            People

              greenman Ian Gilfillan
              f_razzoli Federico Razzoli
              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.