diff --git a/sql/ddl_log.cc b/sql/ddl_log.cc index 23caca9f187..6a8914de853 100644 --- a/sql/ddl_log.cc +++ b/sql/ddl_log.cc @@ -2749,7 +2749,6 @@ bool ddl_log_close_binlogged_events(HASH *xids) @retval 0 Ok. @retval > 0 Fatal error. We have to abort (can't create ddl log) @return < -1 Recovery failed, but new log exists and is usable - */ int ddl_log_execute_recovery() diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 83a5b5c9324..17ff69e4a9b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3119,7 +3119,7 @@ struct Item_change_record: public ilink /* - Register an item tree tree transformation, performed by the query + Register an item tree transformation, performed by the query optimizer. We need a pointer to runtime_memroot because it may be != thd->mem_root (due to possible set_n_backup_active_arena called for thd). */ @@ -8057,6 +8057,18 @@ void THD::issue_unsafe_warnings() /** Log the current query. + @param qtype Query type + @param query_arg Query to be logged + @param query_len Query length + @param is_trans If table is transactional. This is need to know in which + cache the table changes has been logged + @param direct Set if the query should be done directly to binary + log instead of to the binary log cache. + suppress_use Don't write 'use database' to the binary log. Used with + statements like DROP DATABASE. + errcode The error code if the statement failed. + + The query will be logged in either row format or statement format depending on the value of @c current_stmt_binlog_format_row field and the value of the @c qtype parameter. diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d21c1367bab..1756489b430 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4006,7 +4006,7 @@ int mysql_insert_select_prepare(THD *thd, select_result *sel_res) DBUG_RETURN(res); /* - If sel_res is not empty, it means we have items in returing_list. + If sel_res is not empty, it means we have items in returning_list. So we prepare the list now */ if (sel_res) @@ -4747,12 +4747,12 @@ TABLE *select_create::create_table_from_items(THD *thd, List *items, switch (item->type()) { - /* - We have to take into account both the real table's fields and - pseudo-fields used in trigger's body. These fields are used - to copy defaults values later inside constructor of - the class Create_field. - */ + /* + We have to take into account both the real table's fields and + pseudo-fields used in trigger's body. These fields are used + to copy defaults values later inside constructor of + the class Create_field. + */ case Item::FIELD_ITEM: case Item::TRIGGER_FIELD_ITEM: table_field= ((Item_field *) item)->field; @@ -4792,7 +4792,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List *items, DEBUG_SYNC(thd,"create_table_select_before_create"); - /* Check if LOCK TABLES + CREATE OR REPLACE of existing normal table*/ + /* Check if LOCK TABLES + CREATE OR REPLACE of existing normal table */ if (thd->locked_tables_mode && table_list->table && !create_info->tmp_table()) { @@ -5372,7 +5372,7 @@ bool select_create::send_eof() } #endif /* WITH_WSREP */ - /* Log query to ddl log */ + /* Log changed table to ddl log */ backup_log_info ddl_log; bzero(&ddl_log, sizeof(ddl_log)); ddl_log.query= { C_STRING_WITH_LEN("CREATE") }; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 421ef380ba8..7208f77f4fe 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3688,7 +3688,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) /* change LOCK TABLE WRITE to transaction */ - if (lex->sql_command== SQLCOM_LOCK_TABLES && wsrep_convert_LOCK_to_trx) + if (lex->sql_command == SQLCOM_LOCK_TABLES && wsrep_convert_LOCK_to_trx) { for (TABLE_LIST *table= all_tables; table; table= table->next_global) { @@ -3700,7 +3700,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) } } } - if (lex->sql_command== SQLCOM_UNLOCK_TABLES && + if (lex->sql_command == SQLCOM_UNLOCK_TABLES && thd->wsrep_converted_lock_session) { thd->wsrep_converted_lock_session= false; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a1bdf839ac0..567f2213209 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5713,7 +5713,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, #endif /* - We the open source table to get its description in HA_CREATE_INFO + We open source table to get its description in HA_CREATE_INFO and Alter_info objects. This also acquires a shared metadata lock on this table which ensures that no concurrent DDL operation will mess with it. @@ -5722,6 +5722,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, that we can safely perform table creation. Thus by holding both these locks we ensure that our statement is properly isolated from all concurrent operations which matter. + If the target table exists, it will also be opened. */ res= open_tables(thd, *create_info, &thd->lex->query_tables, ¬_used, 0); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index c24da7e2532..cc4657a73e6 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1986,7 +1986,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db, In special cases like "RENAME TABLE `#mysql50#somename` TO `somename`" or "ALTER DATABASE `#mysql50#somename` UPGRADE DATA DIRECTORY NAME" we might be given table or database name with "#mysql50#" prefix (and - trigger's definiton contains un-prefixed version of the same name). + trigger's definition contains un-prefixed version of the same name). To remove this prefix we use check_n_cut_mysql50_prefix(). */ diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 1a8de445264..1431f4a1602 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -2894,7 +2894,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info, if (param->testflag & T_SAFE_REPAIR) { - /* Don't repair if we loosed more than one row */ + /* Don't repair if we lost more than one row */ if (sort_info.new_info->s->state.state.records+1 < start_records) { share->state.state.records= start_records;