[MDEV-11527] Virtual columns do not get along well with NO_ZERO_DATE Created: 2016-12-10  Updated: 2017-01-16  Resolved: 2017-01-13

Status: Closed
Project: MariaDB Server
Component/s: Virtual Columns
Affects Version/s: 5.5, 10.0, 10.1, 10.2.2, 10.2
Fix Version/s: 5.5.55, 10.0.30, 10.1.21, 10.2.4

Type: Bug Priority: Major
Reporter: Nirbhay Choubey (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-7635 update defaults and simplify mysqld c... Closed

 Description   

MariaDB [test]> set sql_mode='STRICT_TRANS_TABLES,NO_ZERO_DATE';
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> CREATE TABLE t1 (
    ->   ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    ->   tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
    -> ) ENGINE=MyISAM;
ERROR 1067 (42000): Invalid default value for 'tsv'



 Comments   
Comment by Elena Stepanova [ 2016-12-25 ]

Not reproducible on MySQL 5.7.

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