mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged configure.in: Auto merged include/config-win.h: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged libmysqld/CMakeLists.txt: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/rpl_row_tabledefs_2myisam.result: Auto merged mysql-test/r/rpl_row_tabledefs_3innodb.result: Auto merged mysql-test/r/rpl_sp.result: Auto merged mysql-test/t/disabled.def: Auto merged mysys/my_thr_init.c: Auto merged sql/CMakeLists.txt: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/handler.cc: Auto merged sql/item_create.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/log.cc: Auto merged sql/log.h: Auto merged sql/log_event.h: Auto merged sql/mysql_priv.h: Auto merged sql/rpl_injector.cc: Auto merged sql/rpl_injector.h: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_locale.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_view.cc: Auto merged sql/table.cc: Auto merged unittest/mysys/my_atomic-t.c: Auto merged sql/log_event.cc: Manual merge main->rpl sql/mysqld.cc: Manual merge main->rpl
This commit is contained in:
@ -1063,9 +1063,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
|
||||
handled either before writing a query log event (inside
|
||||
binlog_query()) or when preparing a pending event.
|
||||
*/
|
||||
#ifdef HAVE_ROW_BASED_REPLICATION
|
||||
thd->binlog_flush_pending_rows_event(TRUE);
|
||||
#endif /*HAVE_ROW_BASED_REPLICATION*/
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
@ -3324,13 +3322,11 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
|
||||
|
||||
*need_reopen= FALSE;
|
||||
|
||||
#ifdef HAVE_ROW_BASED_REPLICATION
|
||||
/*
|
||||
CREATE ... SELECT UUID() locks no tables, we have to test here.
|
||||
*/
|
||||
if (thd->lex->binlog_row_based_if_mixed)
|
||||
thd->set_current_stmt_binlog_row_based_if_mixed();
|
||||
#endif /*HAVE_ROW_BASED_REPLICATION*/
|
||||
|
||||
if (!tables && !thd->lex->requires_prelocking())
|
||||
DBUG_RETURN(0);
|
||||
@ -3362,7 +3358,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
|
||||
{
|
||||
thd->in_lock_tables=1;
|
||||
thd->options|= OPTION_TABLE_LOCK;
|
||||
#ifdef HAVE_ROW_BASED_REPLICATION
|
||||
/*
|
||||
If we have >= 2 different tables to update with auto_inc columns,
|
||||
statement-based binlogging won't work. We can solve this problem in
|
||||
@ -3374,7 +3369,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
|
||||
thd->lex->binlog_row_based_if_mixed= TRUE;
|
||||
thd->set_current_stmt_binlog_row_based_if_mixed();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (! (thd->lock= mysql_lock_tables(thd, start, (uint) (ptr - start),
|
||||
|
Reference in New Issue
Block a user