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

Different handling of out-of-range values for virtual columns with and without indexes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2
    • Component/s: Virtual Columns
    • Labels:
      None

      Description

      No index, no warning

      MariaDB [test]> CREATE TABLE t1 (i INT, vc TINYINT AS (i) VIRTUAL);
      Query OK, 0 rows affected (0.54 sec)
       
      MariaDB [test]> INSERT INTO t1 (i) VALUES (1000);
      Query OK, 1 row affected (0.07 sec)
      

      Warning with index

      MariaDB [test]> CREATE TABLE t1 (i INT, vc TINYINT AS (i) VIRTUAL, INDEX(vc));
      Query OK, 0 rows affected (0.63 sec)
       
      MariaDB [test]> INSERT INTO t1 (i) VALUES (1000);
      Query OK, 1 row affected, 1 warning (0.08 sec)
       
      MariaDB [test]> SHOW WARNINGS;
      +---------+------+---------------------------------------------+
      | Level   | Code | Message                                     |
      +---------+------+---------------------------------------------+
      | Warning | 1264 | Out of range value for column 'vc' at row 1 |
      +---------+------+---------------------------------------------+
      1 row in set (0.00 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: