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

Inconsistency between string and hex warning representation when converting from string to the other types

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.3.12, 5.5.36, 10.0.8
    • Fix Version/s: 5.3.13, 10.0, 5.5
    • Component/s: None
    • Labels:
      None

      Description

      select cast('я' as int), cast('я' as time);
      show warnings;
      

      returns hex warning representation when converting to time/datetime,
      and string representation when converting to the other data types:

      +-------------------+--------------------+
      | cast('я' as int)  | cast('я' as time)  |
      +-------------------+--------------------+
      |                 0 | 00:00:00           |
      +-------------------+--------------------+
      1 row in set, 2 warnings (0.00 sec)
      
      +---------+------+--------------------------------------------+
      | Level   | Code | Message                                    |
      +---------+------+--------------------------------------------+
      | Warning | 1292 | Truncated incorrect INTEGER value: 'я'     |
      | Warning | 1292 | Truncated incorrect time value: '\xD1\x8F' |
      +---------+------+--------------------------------------------+
      2 rows in set (0.00 sec)
      

      It should be fixed to print string representation in both cases.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  bar Alexander Barkov
                  Reporter:
                  bar Alexander Barkov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: