mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-15965 Invisible columns and LOAD DATA don't work well together:... ER_WARN_TOO_FEW_RECORDS
Fix mysql_load iterator to skip invisible fields.
This commit is contained in:
@ -246,3 +246,28 @@ CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SET @a= 1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
##LOAD DATA MDEV-15965 Invisible columns and LOAD DATA don't work well
|
||||
## together: ER_WARN_TOO_FEW_RECORDS
|
||||
create or replace table t1 (a int, b int invisible);
|
||||
insert into t1 values (1),(2);
|
||||
|
||||
select * from t1 into outfile 'f';
|
||||
load data infile 'f' into table t1;
|
||||
select a,b from t1;
|
||||
load data infile 'f' into table t1 (a,@v) SET b=@v;
|
||||
select a,b from t1;
|
||||
load data infile 'f' into table t1 (a,@v) SET b=a;
|
||||
select a,b from t1;
|
||||
truncate table t1;
|
||||
|
||||
insert into t1(a,b) values (1,1),(2,2);
|
||||
select a,b from t1 into outfile 'a';
|
||||
load data infile 'a' into table t1(a,b);
|
||||
select a,b from t1;
|
||||
load data infile 'a' into table t1 (a,@v) SET b=@v;
|
||||
select a,b from t1;
|
||||
load data infile 'a' into table t1 (a,@v) SET b=@v+2;
|
||||
select a,b from t1;
|
||||
|
||||
#cleanup
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user