diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
| commit | 59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch) | |
| tree | 3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /sql/sql_insert.cc | |
| parent | ce02738d7f2f2688eeec7004dd6a30293d36044f (diff) | |
| parent | 6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff) | |
| download | mariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz | |
5.5 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 008c6e573c6..a20596f017b 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1746,7 +1746,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; @@ -1874,7 +1876,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; } @@ -2423,6 +2427,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 |
