[MDEV-15085] Invisible Column Non-constant Default value results wrong values Created: 2018-01-26  Updated: 2021-06-10  Resolved: 2018-02-06

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.3
Fix Version/s: 10.3.5

Type: Bug Priority: Major
Reporter: Sachin Setiya (Inactive) Assignee: Sachin Setiya (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

All


Issue Links:
Relates
relates to MDEV-25891 Computed default for INVISIBLE column... Closed

 Description   

MariaDB [d]> create table t2(a int , b int invisible default (a));
Query OK, 0 rows affected (0.01 sec)
MariaDB [d]> insert into t2 values(2);                                                                                                                
Query OK, 1 row affected (0.00 sec)
MariaDB [d]> select a,b from t2;                                                                                                                      
+------+------+
| a    | b    |
+------+------+
|    2 | NULL |
+------+------+
1 row in set (0.00 sec)



 Comments   
Comment by Sachin Setiya (Inactive) [ 2018-01-26 ]

This issue if kind of related to how we get data for invisible fields, we kind of think it will be there (which is true in the case of constant default (share->default_values will have it)). but not true is default should be calculated dynamically.

Generated at Thu Feb 08 08:18:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.