diff options
author | dlenev@brandersnatch.localdomain <> | 2005-03-16 04:32:47 +0300 |
---|---|---|
committer | dlenev@brandersnatch.localdomain <> | 2005-03-16 04:32:47 +0300 |
commit | f1691140421ecdb37e4706add568b88162a9ec37 (patch) | |
tree | 3fa8e5965f7758c8da8c6827d247549163f01785 /mysql-test/r/user_var.result | |
parent | 3f6fdabe4f5f8d5b2ce91e8842809a8e45e1ba87 (diff) | |
download | mariadb-git-f1691140421ecdb37e4706add568b88162a9ec37.tar.gz |
WL#874 "Extended LOAD DATA".
Now one can use user variables as target for data loaded from file
(besides table's columns). Also LOAD DATA got new SET-clause in which
one can specify values for table columns as expressions.
For example the following is possible:
LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;
This patch also implements new way of replicating LOAD DATA.
Now we do it similarly to other queries.
We store LOAD DATA query in new Execute_load_query event
(which is last in the sequence of events representing LOAD DATA).
When we are executing this event we simply rewrite part of query which
holds name of file (we use name of temporary file) and then execute it
as usual query. In the beggining of this sequence we use Begin_load_query
event which is almost identical to Append_file event
Diffstat (limited to 'mysql-test/r/user_var.result')
-rw-r--r-- | mysql-test/r/user_var.result | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 4bc85a10638..4b2eef20a6b 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -176,13 +176,13 @@ INSERT INTO t1 VALUES(@`a b`); set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); -show binlog events from 96; +show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 96 User var 1 137 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci -master-bin.000001 137 Query 1 230 use `test`; INSERT INTO t1 VALUES(@`a b`) -master-bin.000001 230 User var 1 272 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci -master-bin.000001 272 User var 1 310 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci -master-bin.000001 310 Query 1 411 use `test`; insert into t1 values (@var1),(@var2) +master-bin.000001 # User var 1 # @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES(@`a b`) +master-bin.000001 # User var 1 # @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci +master-bin.000001 # User var 1 # @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 # Query 1 # use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; ROLLBACK; |