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_commit() { return false; }
|
||||||
virtual bool is_rollback() { return false; }
|
virtual bool is_rollback() { return false; }
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
Query_compressed_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
|
Query_compressed_log_event(THD* thd_arg, const char* query_arg,
|
||||||
bool using_trans, bool direct, bool suppress_use, int error);
|
ulong query_length,
|
||||||
|
bool using_trans, bool direct, bool suppress_use,
|
||||||
|
int error);
|
||||||
virtual bool write();
|
virtual bool write();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -6562,8 +6562,8 @@ exit:;
|
|||||||
/**
|
/**
|
||||||
Check if we should log a table DDL to the binlog
|
Check if we should log a table DDL to the binlog
|
||||||
|
|
||||||
@@return true yes
|
@retval true yes
|
||||||
@@return false no
|
@retval false no
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool THD::binlog_table_should_be_logged(const LEX_CSTRING *db)
|
bool THD::binlog_table_should_be_logged(const LEX_CSTRING *db)
|
||||||
@ -7452,8 +7452,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
|
|||||||
*/
|
*/
|
||||||
if (binlog_should_compress(query_len))
|
if (binlog_should_compress(query_len))
|
||||||
{
|
{
|
||||||
Query_compressed_log_event qinfo(this, query_arg, query_len, is_trans, direct,
|
Query_compressed_log_event qinfo(this, query_arg, query_len, is_trans,
|
||||||
suppress_use, errcode);
|
direct, suppress_use, errcode);
|
||||||
error= mysql_bin_log.write(&qinfo);
|
error= mysql_bin_log.write(&qinfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3823,15 +3823,18 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
|||||||
*/
|
*/
|
||||||
lex->current_select= lex->first_select_lex();
|
lex->current_select= lex->first_select_lex();
|
||||||
|
|
||||||
res= setup_returning_fields(thd, table_list) ||
|
res= (setup_returning_fields(thd, table_list) ||
|
||||||
setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, 0, 0) ||
|
setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, 0,
|
||||||
|
0) ||
|
||||||
check_insert_fields(thd, table_list, *fields, values,
|
check_insert_fields(thd, table_list, *fields, values,
|
||||||
!insert_into_view, 1, &map);
|
!insert_into_view, 1, &map));
|
||||||
|
|
||||||
if (!res && fields->elements)
|
if (!res && fields->elements)
|
||||||
{
|
{
|
||||||
Abort_on_warning_instant_set aws(thd, !info.ignore && thd->is_strict_mode());
|
Abort_on_warning_instant_set aws(thd,
|
||||||
res= check_that_all_fields_are_given_values(thd, table_list->table, table_list);
|
!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)
|
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);
|
append_identifier(thd, &query, table_name);
|
||||||
query.append(STRING_WITH_LEN("/* Generated to handle "
|
query.append(STRING_WITH_LEN("/* Generated to handle "
|
||||||
"failed CREATE OR REPLACE */"));
|
"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,
|
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||||
query.ptr(), query.length(),
|
query.ptr(), query.length(),
|
||||||
FALSE, FALSE, temporary_table, 0) > 0;
|
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->variables.option_bits|= OPTION_KEEP_LOG;
|
||||||
thd->log_current_statement= 1;
|
thd->log_current_statement= 1;
|
||||||
create_info->table_was_deleted= 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.
|
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_ENTER("mysql_rename_table");
|
||||||
DBUG_ASSERT(base);
|
DBUG_ASSERT(base);
|
||||||
DBUG_PRINT("enter", ("old: '%s'.'%s' new: '%s'.'%s'",
|
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
|
// Temporarily disable foreign key checks
|
||||||
if (flags & NO_FK_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, "",
|
build_table_filename(from, sizeof(from) - 1, old_db->str, old_name->str, "",
|
||||||
flags & FN_FROM_IS_TMP);
|
flags & FN_FROM_IS_TMP);
|
||||||
length= build_table_filename(to, sizeof(to) - 1, new_db->str, new_name->str, "",
|
length= build_table_filename(to, sizeof(to) - 1, new_db->str,
|
||||||
flags & FN_TO_IS_TMP);
|
new_name->str, "", flags & FN_TO_IS_TMP);
|
||||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||||
if (length+reg_ext_length > FN_REFLEN)
|
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;
|
TABLE table;
|
||||||
char path[FN_REFLEN];
|
char path[FN_REFLEN];
|
||||||
bool result= 0;
|
bool result= 0;
|
||||||
DBUG_ENTER("Triggers::drop_all_triggers");
|
DBUG_ENTER("Table_triggers_list::drop_all_triggers");
|
||||||
|
|
||||||
table.reset();
|
table.reset();
|
||||||
init_sql_alloc(key_memory_Table_trigger_dispatcher,
|
init_sql_alloc(key_memory_Table_trigger_dispatcher,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user