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

CAST from INET6 to FLOAT does not produce an error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.5
    • Fix Version/s: 10.5.0
    • Component/s: Data types
    • Labels:
      None

      Description

      According to MDEV-274, CAST from INET6 to anything other than CHAR or BINARY should produce an error. It doesn't for FLOAT (while it does for DOUBLE):

      create table t1 (a inet6);
      insert into t1 values ('::');
      select cast(a as float) from t1;
      

      10.5 b5fae7f7

      MariaDB [test]> select cast(a as float) from t1;
      +------------------+
      | cast(a as float) |
      +------------------+
      |                0 |
      +------------------+
      1 row in set (0.000 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: