summaryrefslogtreecommitdiff
path: root/mysql-test/r/loaddata.result
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2005-03-16 12:13:35 +0300
committerdlenev@brandersnatch.localdomain <>2005-03-16 12:13:35 +0300
commit3da06a55004360a793a4d6c66748c63c2a6836a8 (patch)
treeb8622bdfca30af3b43d99987e30119fd6b8726bf /mysql-test/r/loaddata.result
parentf1691140421ecdb37e4706add568b88162a9ec37 (diff)
downloadmariadb-git-3da06a55004360a793a4d6c66748c63c2a6836a8.tar.gz
Fixed behavior of LOAD DATA with subqueries in SET clause.
The idea is to use TABLE_LIST::lock_type for passing type of lock for target table to mysql_load() instead of using LEX::lock_option (which were rewritten by first subselect in SET clause). This should also fix potential problem with LOAD DATA in SP (it is important for them to have right lock_type in the table list by the end of statement parsing).
Diffstat (limited to 'mysql-test/r/loaddata.result')
-rw-r--r--mysql-test/r/loaddata.result12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 562b855f3e3..d76fff372f5 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1, t2;
create table t1 (a date, b date, c date not null, d date);
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
Warnings:
@@ -111,4 +111,12 @@ a b c
5 6 5+6+123+6+NIL
load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b);
ERROR HY000: Can't load value from file with fixed size rows to variable
-drop table t1;
+create table t2 (num int primary key, str varchar(10));
+insert into t2 values (10,'Ten'), (15,'Fifteen');
+truncate table t1;
+load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n);
+select * from t1;
+a b c
+10 NULL Ten
+15 NULL Fifteen
+drop table t1, t2;