Trivial fixups, no code changes
- Indentation changes - Fixed wrong name for used in DBUG_ENTER - Added some code comments
This commit is contained in:
parent
dd757ee02f
commit
3c4b8440eb
@ -2227,8 +2227,10 @@ public:
|
||||
virtual bool is_commit() { return false; }
|
||||
virtual bool is_rollback() { return false; }
|
||||
#ifdef MYSQL_SERVER
|
||||
Query_compressed_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
|
||||
bool using_trans, bool direct, bool suppress_use, int error);
|
||||
Query_compressed_log_event(THD* thd_arg, const char* query_arg,
|
||||
ulong query_length,
|
||||
bool using_trans, bool direct, bool suppress_use,
|
||||
int error);
|
||||
virtual bool write();
|
||||
#endif
|
||||
};
|
||||
|
@ -6562,8 +6562,8 @@ exit:;
|
||||
/**
|
||||
Check if we should log a table DDL to the binlog
|
||||
|
||||
@@return true yes
|
||||
@@return false no
|
||||
@retval true yes
|
||||
@retval false no
|
||||
*/
|
||||
|
||||
bool THD::binlog_table_should_be_logged(const LEX_CSTRING *db)
|
||||
@ -7452,14 +7452,14 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
|
||||
*/
|
||||
if (binlog_should_compress(query_len))
|
||||
{
|
||||
Query_compressed_log_event qinfo(this, query_arg, query_len, is_trans, direct,
|
||||
suppress_use, errcode);
|
||||
Query_compressed_log_event qinfo(this, query_arg, query_len, is_trans,
|
||||
direct, suppress_use, errcode);
|
||||
error= mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
Query_log_event qinfo(this, query_arg, query_len, is_trans, direct,
|
||||
suppress_use, errcode);
|
||||
suppress_use, errcode);
|
||||
error= mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
/*
|
||||
|
@ -1211,7 +1211,7 @@ values_loop_end:
|
||||
such case the flag is ignored for constructing binlog event.
|
||||
*/
|
||||
DBUG_ASSERT(thd->killed != KILL_BAD_DATA || error > 0);
|
||||
if (was_insert_delayed && table_list->lock_type == TL_WRITE)
|
||||
if (was_insert_delayed && table_list->lock_type == TL_WRITE)
|
||||
{
|
||||
/* Binlog INSERT DELAYED as INSERT without DELAYED. */
|
||||
String log_query;
|
||||
@ -3823,15 +3823,18 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
*/
|
||||
lex->current_select= lex->first_select_lex();
|
||||
|
||||
res= setup_returning_fields(thd, table_list) ||
|
||||
setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, 0, 0) ||
|
||||
check_insert_fields(thd, table_list, *fields, values,
|
||||
!insert_into_view, 1, &map);
|
||||
res= (setup_returning_fields(thd, table_list) ||
|
||||
setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, 0,
|
||||
0) ||
|
||||
check_insert_fields(thd, table_list, *fields, values,
|
||||
!insert_into_view, 1, &map));
|
||||
|
||||
if (!res && fields->elements)
|
||||
{
|
||||
Abort_on_warning_instant_set aws(thd, !info.ignore && thd->is_strict_mode());
|
||||
res= check_that_all_fields_are_given_values(thd, table_list->table, table_list);
|
||||
Abort_on_warning_instant_set aws(thd,
|
||||
!info.ignore && thd->is_strict_mode());
|
||||
res= check_that_all_fields_are_given_values(thd, table_list->table,
|
||||
table_list);
|
||||
}
|
||||
|
||||
if (info.handle_duplicates == DUP_UPDATE && !res)
|
||||
|
@ -2828,6 +2828,12 @@ bool log_drop_table(THD *thd, const LEX_CSTRING *db_name,
|
||||
append_identifier(thd, &query, table_name);
|
||||
query.append(STRING_WITH_LEN("/* Generated to handle "
|
||||
"failed CREATE OR REPLACE */"));
|
||||
|
||||
/*
|
||||
In case of temporary tables we don't have to log the database name
|
||||
in the binary log. We log this for non temporary tables, as the slave
|
||||
may use a filter to ignore queries for a specific database.
|
||||
*/
|
||||
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query.ptr(), query.length(),
|
||||
FALSE, FALSE, temporary_table, 0) > 0;
|
||||
@ -5205,7 +5211,8 @@ int create_table_impl(THD *thd, const LEX_CSTRING &orig_db,
|
||||
thd->variables.option_bits|= OPTION_KEEP_LOG;
|
||||
thd->log_current_statement= 1;
|
||||
create_info->table_was_deleted= 1;
|
||||
DBUG_EXECUTE_IF("send_kill_after_delete", thd->set_killed(KILL_QUERY); );
|
||||
DBUG_EXECUTE_IF("send_kill_after_delete",
|
||||
thd->set_killed(KILL_QUERY); );
|
||||
|
||||
/*
|
||||
Restart statement transactions for the case of CREATE ... SELECT.
|
||||
@ -5745,7 +5752,8 @@ mysql_rename_table(handlerton *base, const LEX_CSTRING *old_db,
|
||||
DBUG_ENTER("mysql_rename_table");
|
||||
DBUG_ASSERT(base);
|
||||
DBUG_PRINT("enter", ("old: '%s'.'%s' new: '%s'.'%s'",
|
||||
old_db->str, old_name->str, new_db->str, new_name->str));
|
||||
old_db->str, old_name->str, new_db->str,
|
||||
new_name->str));
|
||||
|
||||
// Temporarily disable foreign key checks
|
||||
if (flags & NO_FK_CHECKS)
|
||||
@ -5755,8 +5763,8 @@ mysql_rename_table(handlerton *base, const LEX_CSTRING *old_db,
|
||||
|
||||
build_table_filename(from, sizeof(from) - 1, old_db->str, old_name->str, "",
|
||||
flags & FN_FROM_IS_TMP);
|
||||
length= build_table_filename(to, sizeof(to) - 1, new_db->str, new_name->str, "",
|
||||
flags & FN_TO_IS_TMP);
|
||||
length= build_table_filename(to, sizeof(to) - 1, new_db->str,
|
||||
new_name->str, "", flags & FN_TO_IS_TMP);
|
||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||
if (length+reg_ext_length > FN_REFLEN)
|
||||
{
|
||||
|
@ -1826,7 +1826,7 @@ bool Table_triggers_list::drop_all_triggers(THD *thd, const LEX_CSTRING *db,
|
||||
TABLE table;
|
||||
char path[FN_REFLEN];
|
||||
bool result= 0;
|
||||
DBUG_ENTER("Triggers::drop_all_triggers");
|
||||
DBUG_ENTER("Table_triggers_list::drop_all_triggers");
|
||||
|
||||
table.reset();
|
||||
init_sql_alloc(key_memory_Table_trigger_dispatcher,
|
||||
|
Loading…
x
Reference in New Issue
Block a user