mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/extra/rpl_tests/rpl_loaddata.test Text conflict in mysql-test/r/mysqlbinlog2.result Text conflict in mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Text conflict in mysql-test/suite/binlog/r/binlog_unsafe.result Text conflict in mysql-test/suite/rpl/r/rpl_insert_id.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result Text conflict in mysql-test/suite/rpl/r/rpl_udf.result Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test Text conflict in sql/field.h Text conflict in sql/log.cc Text conflict in sql/log_event.cc Text conflict in sql/log_event_old.cc Text conflict in sql/mysql_priv.h Text conflict in sql/share/errmsg.txt Text conflict in sql/sp.cc Text conflict in sql/sql_acl.cc Text conflict in sql/sql_base.cc Text conflict in sql/sql_class.h Text conflict in sql/sql_db.cc Text conflict in sql/sql_delete.cc Text conflict in sql/sql_insert.cc Text conflict in sql/sql_lex.cc Text conflict in sql/sql_lex.h Text conflict in sql/sql_load.cc Text conflict in sql/sql_table.cc Text conflict in sql/sql_update.cc Text conflict in sql/sql_view.cc Conflict adding files to storage/innobase. Created directory. Conflict because storage/innobase is not versioned, but has versioned children. Versioned directory. Conflict adding file storage/innobase. Moved existing file to storage/innobase.moved. Conflict adding files to storage/innobase/handler. Created directory. Conflict because storage/innobase/handler is not versioned, but has versioned children. Versioned directory. Contents conflict in storage/innobase/handler/ha_innodb.cc
This commit is contained in:
@ -2487,7 +2487,7 @@ int handler::update_auto_increment()
|
||||
variables->auto_increment_increment);
|
||||
auto_inc_intervals_count++;
|
||||
/* Row-based replication does not need to store intervals in binlog */
|
||||
if (mysql_bin_log.is_open() && !thd->current_stmt_binlog_row_based)
|
||||
if (mysql_bin_log.is_open() && !thd->is_current_stmt_binlog_format_row())
|
||||
thd->auto_inc_intervals_in_cur_stmt_for_binlog.append(auto_inc_interval_for_cur_row.minimum(),
|
||||
auto_inc_interval_for_cur_row.values(),
|
||||
variables->auto_increment_increment);
|
||||
@ -4487,7 +4487,7 @@ static bool check_table_binlog_row_based(THD *thd, TABLE *table)
|
||||
DBUG_ASSERT(table->s->cached_row_logging_check == 0 ||
|
||||
table->s->cached_row_logging_check == 1);
|
||||
|
||||
return (thd->current_stmt_binlog_row_based &&
|
||||
return (thd->is_current_stmt_binlog_format_row() &&
|
||||
table->s->cached_row_logging_check &&
|
||||
(thd->options & OPTION_BIN_LOG) &&
|
||||
mysql_bin_log.is_open());
|
||||
@ -4549,7 +4549,21 @@ static int write_locked_table_maps(THD *thd)
|
||||
if (table->current_lock == F_WRLCK &&
|
||||
check_table_binlog_row_based(thd, table))
|
||||
{
|
||||
int const has_trans= table->file->has_transactions();
|
||||
/*
|
||||
We need to have a transactional behavior for SQLCOM_CREATE_TABLE
|
||||
(e.g. CREATE TABLE... SELECT * FROM TABLE) in order to keep a
|
||||
compatible behavior with the STMT based replication even when
|
||||
the table is not transactional. In other words, if the operation
|
||||
fails while executing the insert phase nothing is written to the
|
||||
binlog.
|
||||
|
||||
Note that at this point, we check the type of a set of tables to
|
||||
create the table map events. In the function binlog_log_row(),
|
||||
which calls the current function, we check the type of the table
|
||||
of the current row.
|
||||
*/
|
||||
bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
|
||||
table->file->has_transactions();
|
||||
int const error= thd->binlog_write_table_map(table, has_trans);
|
||||
/*
|
||||
If an error occurs, it is the responsibility of the caller to
|
||||
@ -4598,10 +4612,20 @@ static int binlog_log_row(TABLE* table,
|
||||
{
|
||||
bitmap_set_all(&cols);
|
||||
if (likely(!(error= write_locked_table_maps(thd))))
|
||||
error= (*log_func)(thd, table, table->file->has_transactions(),
|
||||
&cols, table->s->fields,
|
||||
{
|
||||
/*
|
||||
We need to have a transactional behavior for SQLCOM_CREATE_TABLE
|
||||
(i.e. CREATE TABLE... SELECT * FROM TABLE) in order to keep a
|
||||
compatible behavior with the STMT based replication even when
|
||||
the table is not transactional. In other words, if the operation
|
||||
fails while executing the insert phase nothing is written to the
|
||||
binlog.
|
||||
*/
|
||||
bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
|
||||
table->file->has_transactions();
|
||||
error= (*log_func)(thd, table, has_trans, &cols, table->s->fields,
|
||||
before_record, after_record);
|
||||
|
||||
}
|
||||
if (!use_bitbuf)
|
||||
bitmap_free(&cols);
|
||||
}
|
||||
|
Reference in New Issue
Block a user