[MDEV-11561] Different handling of out-of-range values for virtual columns with and without indexes Created: 2016-12-14  Updated: 2017-01-02

Status: Open
Project: MariaDB Server
Component/s: Virtual Columns
Affects Version/s: 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5800 indexes on virtual (not materialized)... Closed

 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)



 Comments   
Comment by Elena Stepanova [ 2017-01-02 ]

Also reproducible on bb-10.2-monty as of 349d69e2e

Generated at Thu Feb 08 07:50:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.