diff options
author | sasha@mysql.sashanet.com <> | 2000-11-17 23:35:40 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2000-11-17 23:35:40 -0700 |
commit | 24a7aae0f452f75cdfb09ccf1cec37d38d0f82a9 (patch) | |
tree | ccc45fd7f4b333edac1dbea98d87b49f1a6635a5 /sql/sql_insert.cc | |
parent | f046a11591b8d2e3230ec1ea9eac1773d359d29e (diff) | |
download | mariadb-git-24a7aae0f452f75cdfb09ccf1cec37d38d0f82a9.tar.gz |
fixed bugs in delayed insert replication and when slave loses connection after Int_var but before Query
public test suite now tests replication code as well
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b552479bfe2..ec727591e2a 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -113,8 +113,15 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields, char *query=thd->query; DBUG_ENTER("mysql_insert"); + /* + in safe mode or with skip-new change delayed insert to be regular + if we are told to replace duplicates, the insert cannot be concurrent + delayed insert changed to regular in slave thread + */ if (lock_type == TL_WRITE_DELAYED && - (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) || + ((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) || + thd->slave_thread + ) || lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE) lock_type=TL_WRITE; @@ -1083,6 +1090,7 @@ bool delayed_insert::handle_inserts(void) table->time_stamp=row->time_stamp; info.handle_duplicates= row->dup; + thd.net.last_errno = 0; // reset error for binlog if (write_record(table,&info)) { info.error++; // Ignore errors |