mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Simple fixes during review of new code
This commit is contained in:
@@ -1810,24 +1810,13 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
|
||||
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
|
||||
@@ -1845,9 +1834,18 @@ 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;
|
||||
}
|
||||
/*
|
||||
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;
|
||||
thd->lex->duplicates= handle_dup;
|
||||
|
||||
sql_exchange ex((char*)fname, sql_ex.opt_flags & DUMPFILE_FLAG);
|
||||
String field_term(sql_ex.field_term,sql_ex.field_term_len,log_cs);
|
||||
|
Reference in New Issue
Block a user