mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the database created when checking conditions for replication. CREATE/DROP/ALTER DATABASE statements are now replicated based on the manipulated database. mysql-test/t/rpl_until.test: Longer sleep to allow slave to stop. mysql-test/t/rpl_charset.test: Position change in binary file. mysql-test/r/drop_temp_table.result: Position change in binlog. mysql-test/r/rpl_loaddata_rule_m.result: Position change in binlog. mysql-test/r/rpl_charset.result: Position change in binlog. sql/log_event.h: Added new flag and parameter to suppress generation of USE statements. sql/log_event.cc: Added parameter and code to suppress generation of USE statements. sql/sql_db.cc: Suppress generation of USE before CREATE/ALTER/DROP DATABASE statements. sql/log.cc: Query_log_event have new extra parameter. sql/sql_table.cc: Query_log_event have new extra parameter. sql/sql_base.cc: Query_log_event have new extra parameter. sql/sql_update.cc: Query_log_event have new extra parameter. sql/sql_insert.cc: Query_log_event have new extra parameter. sql/sql_rename.cc: Query_log_event have new extra parameter. sql/sql_delete.cc: Query_log_event have new extra parameter. sql/sql_acl.cc: Query_log_event have new extra parameter. sql/handler.cc: Query_log_event have new extra parameter. sql/item_func.cc: Query_log_event have new extra parameter. sql/sql_parse.cc: Query_log_event have new extra parameter.
This commit is contained in:
@@ -368,7 +368,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
if (error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && transactional_table)
|
||||
error=1;
|
||||
}
|
||||
@@ -1364,7 +1364,7 @@ bool delayed_insert::handle_inserts(void)
|
||||
mysql_update_log.write(&thd,row->query, row->query_length);
|
||||
if (row->log_query & DELAYED_LOG_BIN && using_bin_log)
|
||||
{
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length,0);
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length,0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@@ -1539,7 +1539,7 @@ void select_insert::send_error(uint errcode,const char *err)
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
table->file->has_transactions());
|
||||
table->file->has_transactions(), FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if (!table->tmp_table)
|
||||
@@ -1581,7 +1581,7 @@ bool select_insert::send_eof()
|
||||
if (!error)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
table->file->has_transactions());
|
||||
table->file->has_transactions(), FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
|
||||
|
Reference in New Issue
Block a user