[MDEV-29806] INSERT .. SELECT into user-defined versioning columns does not produce error/warning Created: 2022-10-16  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Data Manipulation - Insert, Versioned Tables
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4, 10.5, 10.6

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


 Description   

create table t (a int, s timestamp(6) as row start, e timestamp(6) as row end, period for system_time (s,e)) with system versioning;
insert into t (a) values (1);
 
--error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
insert into t values (2,now(),from_unixtime(2147483647.999999));
--error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
insert into t (a,s,e) values (2,now(),from_unixtime(2147483647.999999));
--error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
insert into t (a,s,e) select a,s,e from t;
 
insert into t select * from t;
 
# Cleanup
drop table t;

In the test case above, INSERT VALUES produces the error/warning regardless whether a list of column is provided; INSERT .. (column list) SELECT ... also produces it; but INSERT .. SELECT without the column list does not. For a table with usual virtual columns it does.


Generated at Thu Feb 08 10:11:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.