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:
@ -1736,7 +1736,7 @@ end:
|
||||
*/
|
||||
|
||||
int write_bin_log(THD *thd, bool clear_error,
|
||||
char const *query, ulong query_length)
|
||||
char const *query, ulong query_length, bool is_trans)
|
||||
{
|
||||
int error= 0;
|
||||
if (mysql_bin_log.is_open())
|
||||
@ -1747,7 +1747,8 @@ int write_bin_log(THD *thd, bool clear_error,
|
||||
else
|
||||
errcode= query_error_code(thd, TRUE);
|
||||
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query, query_length, FALSE, FALSE, errcode);
|
||||
query, query_length, is_trans, FALSE, FALSE,
|
||||
errcode);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
@ -1860,7 +1861,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
LINT_INIT(alias);
|
||||
LINT_INIT(path_length);
|
||||
|
||||
if (thd->current_stmt_binlog_row_based && !dont_log_query)
|
||||
if (thd->is_current_stmt_binlog_format_row() && !dont_log_query)
|
||||
{
|
||||
built_query.set_charset(system_charset_info);
|
||||
if (if_exists)
|
||||
@ -1920,7 +1921,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
// removed temporary table
|
||||
tmp_table_deleted= 1;
|
||||
if (thd->variables.binlog_format == BINLOG_FORMAT_MIXED &&
|
||||
thd->current_stmt_binlog_row_based)
|
||||
thd->is_current_stmt_binlog_format_row())
|
||||
{
|
||||
if (built_tmp_query.is_empty())
|
||||
{
|
||||
@ -1954,7 +1955,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
being built. The string always end in a comma and the comma
|
||||
will be chopped off before being written to the binary log.
|
||||
*/
|
||||
if (!drop_temporary && thd->current_stmt_binlog_row_based && !dont_log_query)
|
||||
if (!drop_temporary && thd->is_current_stmt_binlog_format_row() && !dont_log_query)
|
||||
{
|
||||
non_temp_tables_count++;
|
||||
/*
|
||||
@ -2088,7 +2089,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
query_cache_invalidate3(thd, tables, 0);
|
||||
if (!dont_log_query)
|
||||
{
|
||||
if (!thd->current_stmt_binlog_row_based ||
|
||||
if (!thd->is_current_stmt_binlog_format_row() ||
|
||||
(non_temp_tables_count > 0 && !tmp_table_deleted))
|
||||
{
|
||||
/*
|
||||
@ -2100,7 +2101,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
*/
|
||||
error |= write_bin_log(thd, !error, thd->query(), thd->query_length());
|
||||
}
|
||||
else if (thd->current_stmt_binlog_row_based &&
|
||||
else if (thd->is_current_stmt_binlog_format_row() &&
|
||||
tmp_table_deleted)
|
||||
{
|
||||
if (non_temp_tables_count > 0)
|
||||
@ -2139,7 +2140,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
*/
|
||||
built_tmp_query.chop(); // Chop of the last comma
|
||||
built_tmp_query.append(" /* generated by server */");
|
||||
error|= write_bin_log(thd, !error, built_tmp_query.ptr(), built_tmp_query.length());
|
||||
error|= write_bin_log(thd, !error, built_tmp_query.ptr(), built_tmp_query.length(),
|
||||
thd->in_multi_stmt_transaction());
|
||||
}
|
||||
}
|
||||
|
||||
@ -3592,8 +3594,8 @@ static inline int write_create_table_bin_log(THD *thd,
|
||||
Otherwise, the statement shall be binlogged.
|
||||
*/
|
||||
if (!internal_tmp_table &&
|
||||
(!thd->current_stmt_binlog_row_based ||
|
||||
(thd->current_stmt_binlog_row_based &&
|
||||
(!thd->is_current_stmt_binlog_format_row() ||
|
||||
(thd->is_current_stmt_binlog_format_row() &&
|
||||
!(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
|
||||
return write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
return 0;
|
||||
@ -5361,7 +5363,7 @@ binlog:
|
||||
/*
|
||||
We have to write the query before we unlock the tables.
|
||||
*/
|
||||
if (thd->current_stmt_binlog_row_based)
|
||||
if (thd->is_current_stmt_binlog_format_row())
|
||||
{
|
||||
/*
|
||||
Since temporary tables are not replicated under row-based
|
||||
@ -6565,7 +6567,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query(), thd->query_length(),
|
||||
0, FALSE, 0);
|
||||
FALSE, TRUE, FALSE, 0);
|
||||
if (error= mysql_bin_log.write(&qinfo))
|
||||
goto view_err_unlock;
|
||||
}
|
||||
@ -7309,8 +7311,8 @@ view_err:
|
||||
/* Should pass the 'new_name' as we store table name in the cache */
|
||||
if (rename_temporary_table(thd, new_table, new_db, new_name))
|
||||
goto err1;
|
||||
/* We don't replicate alter table statement on temporary tables */
|
||||
if (!thd->current_stmt_binlog_row_based &&
|
||||
|
||||
if (!thd->is_current_stmt_binlog_format_row() &&
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
|
||||
DBUG_RETURN(TRUE);
|
||||
goto end_temporary;
|
||||
@ -7473,7 +7475,7 @@ view_err:
|
||||
db, table_name);
|
||||
|
||||
DBUG_ASSERT(!(mysql_bin_log.is_open() &&
|
||||
thd->current_stmt_binlog_row_based &&
|
||||
thd->is_current_stmt_binlog_format_row() &&
|
||||
(create_info->options & HA_LEX_CREATE_TMP_TABLE)));
|
||||
if (write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
Reference in New Issue
Block a user