diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2014-02-03 15:22:39 +0100 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-03 15:22:39 +0100 |
| commit | 72c20282db820b0b0818aea160a485bdca897eec (patch) | |
| tree | 3089e022d958990fc0a405a38ba43ae00c87103c /sql/sql_insert.cc | |
| parent | 5e1d5d9bc0bf9ea776bffe6c4914a84be920c0b2 (diff) | |
| parent | 2acc01b3cfa27074f93016b893cda20fa0a3497f (diff) | |
| download | mariadb-git-72c20282db820b0b0818aea160a485bdca897eec.tar.gz | |
10.0-base merge
Diffstat (limited to 'sql/sql_insert.cc')
| -rw-r--r-- | sql/sql_insert.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b764263265e..e0ecfcac72e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1749,7 +1749,9 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) if (info->ignore && !table->file->is_fatal_error(error, HA_CHECK_DUP_KEY)) { - table->file->print_error(error, MYF(ME_JUST_WARNING)); + if (!(thd->variables.old_behavior & + OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) + table->file->print_error(error, MYF(ME_JUST_WARNING)); goto ok_or_after_trg_err; } goto err; @@ -1877,7 +1879,9 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) if (!info->ignore || table->file->is_fatal_error(error, HA_CHECK_DUP)) goto err; - table->file->print_error(error, MYF(ME_JUST_WARNING)); + if (!(thd->variables.old_behavior & + OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) + table->file->print_error(error, MYF(ME_JUST_WARNING)); table->file->restore_auto_increment(prev_insert_id); goto ok_or_after_trg_err; } @@ -2428,6 +2432,10 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) goto error; dfield_ptr= copy->default_field; } + + /* Ensure we don't use the table list of the original table */ + copy->pos_in_table_list= 0; + /* Make a copy of all fields. The copied fields need to point into the copied record. This is done |
