1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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


mysql-test/mybin/mysql-test_install_db:
  fixes to test replication with two daemons on one machine
mysql-test/mysql-test-run:
  fixes for replication tests -- still need to test gcov, the rest works
mysql-test/t/include/master-slave.inc:
  include file for replication tests
sql/slave.cc:
  fixed bug for the case when the slave loses connection after it has read Int_var event but before Query
sql/sql_insert.cc:
  reset error in delayed thread
  slave converts delayed insert to regular
This commit is contained in:
unknown
2000-11-17 23:35:40 -07:00
parent 5abcec92c0
commit 53ada89055
20 changed files with 45626 additions and 58 deletions

View File

@@ -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