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

Weird hex warnings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 5.5.37, 10.0.10
    • Fix Version/s: 5.5.38, 10.0.11
    • Component/s: None
    • Labels:
      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

              Assignee:
              greenman Ian Gilfillan
              Reporter:
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration