mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Manual merge from mysql-trunk-merge.
This commit is contained in:
@ -2099,7 +2099,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
tables). In this case, we can write the original query into
|
||||
the binary log.
|
||||
*/
|
||||
write_bin_log(thd, !error, thd->query, thd->query_length);
|
||||
write_bin_log(thd, !error, thd->query(), thd->query_length());
|
||||
}
|
||||
else if (thd->current_stmt_binlog_row_based &&
|
||||
tmp_table_deleted)
|
||||
@ -3596,7 +3596,7 @@ static inline void write_create_table_bin_log(THD *thd,
|
||||
(!thd->current_stmt_binlog_row_based ||
|
||||
(thd->current_stmt_binlog_row_based &&
|
||||
!(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
}
|
||||
|
||||
|
||||
@ -5473,14 +5473,14 @@ binlog:
|
||||
write_bin_log(thd, TRUE, query.ptr(), query.length());
|
||||
}
|
||||
else // Case 1
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
}
|
||||
/*
|
||||
Case 3 and 4 does nothing under RBR
|
||||
*/
|
||||
}
|
||||
else
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
|
||||
res= FALSE;
|
||||
|
||||
@ -5568,7 +5568,7 @@ mysql_discard_or_import_tablespace(THD *thd,
|
||||
error=1;
|
||||
if (error)
|
||||
goto err;
|
||||
write_bin_log(thd, FALSE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, FALSE, thd->query(), thd->query_length());
|
||||
|
||||
err:
|
||||
ha_autocommit_or_rollback(thd, error);
|
||||
@ -6578,7 +6578,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
Query_log_event qinfo(thd, thd->query(), thd->query_length(),
|
||||
0, FALSE, 0);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
@ -6832,7 +6832,7 @@ view_err:
|
||||
|
||||
if (!error)
|
||||
{
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
my_ok(thd);
|
||||
}
|
||||
else if (error > 0)
|
||||
@ -7322,7 +7322,7 @@ view_err:
|
||||
goto err1;
|
||||
/* We don't replicate alter table statement on temporary tables */
|
||||
if (!thd->current_stmt_binlog_row_based)
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
goto end_temporary;
|
||||
}
|
||||
|
||||
@ -7479,13 +7479,13 @@ view_err:
|
||||
DBUG_EXECUTE_IF("sleep_alter_before_main_binlog", my_sleep(6000000););
|
||||
|
||||
ha_binlog_log_query(thd, create_info->db_type, LOGCOM_ALTER_TABLE,
|
||||
thd->query, thd->query_length,
|
||||
thd->query(), thd->query_length(),
|
||||
db, table_name);
|
||||
|
||||
DBUG_ASSERT(!(mysql_bin_log.is_open() &&
|
||||
thd->current_stmt_binlog_row_based &&
|
||||
(create_info->options & HA_LEX_CREATE_TMP_TABLE)));
|
||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||
|
||||
if (ha_check_storage_engine_flag(old_db_type, HTON_FLUSH_AFTER_RENAME))
|
||||
{
|
||||
|
Reference in New Issue
Block a user