diff options
author | unknown <mats@mysql.com> | 2005-07-05 14:08:22 +0200 |
---|---|---|
committer | unknown <mats@mysql.com> | 2005-07-05 14:08:22 +0200 |
commit | 5842bccf6d3655b2388674ee1133583441dfe5ea (patch) | |
tree | 70ccaec52dec5d13df5b458381fbdbb7a373fa9c /sql | |
parent | 0362dcf54348bb04ff1e898714ffde28538643fe (diff) | |
parent | 28f554af12c934acdaa13d673edc5bd51a4567c8 (diff) | |
download | mariadb-git-5842bccf6d3655b2388674ee1133583441dfe5ea.tar.gz |
Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b11401-mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log_event.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index a4319f63b83..cda385c911b 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1809,11 +1809,25 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli, "` <...>", NullS) - load_data_query); thd->query= load_data_query; } + + /* + We need to set thd->lex->sql_command and thd->lex->duplicates + since InnoDB tests these variables to decide if this is a LOAD + DATA ... REPLACE INTO ... statement even though mysql_parse() + is not called. This is not needed in 5.0 since there the LOAD + DATA ... statement is replicated using mysql_parse(), which + sets the thd->lex fields correctly. + */ + thd->lex->sql_command= SQLCOM_LOAD; if (sql_ex.opt_flags & REPLACE_FLAG) + { + thd->lex->duplicates= DUP_REPLACE; handle_dup= DUP_REPLACE; + } else if (sql_ex.opt_flags & IGNORE_FLAG) { ignore= 1; + thd->lex->duplicates= DUP_ERROR; handle_dup= DUP_ERROR; } else @@ -1831,6 +1845,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli, If reading from net (a 3.23 master), mysql_load() will change this to IGNORE. */ + thd->lex->duplicates= DUP_ERROR; handle_dup= DUP_ERROR; } |