Skip to content

Commit bfeaa1f

Browse files
author
Alexander Nozdrin
committed
Refactoring (on behalf of Jon Olav):
rename of MYSQL_ERROR to Sql_condition.
1 parent aa3c854 commit bfeaa1f

75 files changed

Lines changed: 667 additions & 670 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sql/binlog.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void check_binlog_cache_size(THD *thd)
370370
{
371371
if (thd)
372372
{
373-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
373+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
374374
ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX,
375375
ER(ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX),
376376
(ulong) binlog_cache_size,
@@ -396,7 +396,7 @@ void check_binlog_stmt_cache_size(THD *thd)
396396
{
397397
if (thd)
398398
{
399-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
399+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
400400
ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX,
401401
ER(ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX),
402402
(ulong) binlog_stmt_cache_size,
@@ -2329,7 +2329,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
23292329
{
23302330
if (my_errno == ENOENT)
23312331
{
2332-
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2332+
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
23332333
ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE),
23342334
linfo.log_file_name);
23352335
sql_print_information("Failed to delete file '%s'",
@@ -2339,7 +2339,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
23392339
}
23402340
else
23412341
{
2342-
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2342+
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
23432343
ER_BINLOG_PURGE_FATAL_ERR,
23442344
"a problem with deleting %s; "
23452345
"consider examining correspondence "
@@ -2360,7 +2360,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
23602360
{
23612361
if (my_errno == ENOENT)
23622362
{
2363-
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2363+
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
23642364
ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE),
23652365
index_file_name);
23662366
sql_print_information("Failed to delete file '%s'",
@@ -2370,7 +2370,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
23702370
}
23712371
else
23722372
{
2373-
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2373+
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
23742374
ER_BINLOG_PURGE_FATAL_ERR,
23752375
"a problem with deleting %s; "
23762376
"consider examining correspondence "
@@ -2932,7 +2932,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
29322932
*/
29332933
if (thd)
29342934
{
2935-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2935+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
29362936
ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE),
29372937
log_info.log_file_name);
29382938
}
@@ -2947,7 +2947,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
29472947
*/
29482948
if (thd)
29492949
{
2950-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2950+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
29512951
ER_BINLOG_PURGE_FATAL_ERR,
29522952
"a problem with getting info on being purged %s; "
29532953
"consider examining correspondence "
@@ -2975,7 +2975,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
29752975
{
29762976
if (thd)
29772977
{
2978-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
2978+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
29792979
ER_BINLOG_PURGE_FATAL_ERR,
29802980
"a problem with deleting %s and "
29812981
"reading the binlog index file",
@@ -3011,7 +3011,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
30113011
{
30123012
if (thd)
30133013
{
3014-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3014+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
30153015
ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE),
30163016
log_info.log_file_name);
30173017
}
@@ -3023,7 +3023,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
30233023
{
30243024
if (thd)
30253025
{
3026-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3026+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
30273027
ER_BINLOG_PURGE_FATAL_ERR,
30283028
"a problem with deleting %s; "
30293029
"consider examining correspondence "
@@ -3114,7 +3114,7 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
31143114
*/
31153115
if (thd)
31163116
{
3117-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3117+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
31183118
ER_BINLOG_PURGE_FATAL_ERR,
31193119
"a problem with getting info on being purged %s; "
31203120
"consider examining correspondence "
@@ -5828,7 +5828,7 @@ void THD::issue_unsafe_warnings()
58285828
{
58295829
if ((unsafe_type_flags & (1 << unsafe_type)) != 0)
58305830
{
5831-
push_warning_printf(this, MYSQL_ERROR::WARN_LEVEL_NOTE,
5831+
push_warning_printf(this, Sql_condition::WARN_LEVEL_NOTE,
58325832
ER_BINLOG_UNSAFE_STATEMENT,
58335833
ER(ER_BINLOG_UNSAFE_STATEMENT),
58345834
ER(LEX::binlog_stmt_unsafe_errcode[unsafe_type]));

sql/debug_sync.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
17851785
sig_wait, sig_glob, error));});
17861786
if (error == ETIMEDOUT || error == ETIME)
17871787
{
1788-
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
1788+
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
17891789
ER_DEBUG_SYNC_TIMEOUT, ER(ER_DEBUG_SYNC_TIMEOUT));
17901790
break;
17911791
}

sql/event_data_objects.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ Event_timed::load_from_row(THD *thd, TABLE *table)
607607
table, &creation_ctx))
608608
{
609609
push_warning_printf(thd,
610-
MYSQL_ERROR::WARN_LEVEL_WARN,
610+
Sql_condition::WARN_LEVEL_WARN,
611611
ER_EVENT_INVALID_CREATION_CTX,
612612
ER(ER_EVENT_INVALID_CREATION_CTX),
613613
(const char *) dbname.str,

sql/event_db_repository.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
676676
if (create_if_not)
677677
{
678678
*event_already_exists= true;
679-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
679+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
680680
ER_EVENT_ALREADY_EXISTS, ER(ER_EVENT_ALREADY_EXISTS),
681681
parse_data->name.str);
682682
ret= 0;
@@ -906,7 +906,7 @@ Event_db_repository::drop_event(THD *thd, LEX_STRING db, LEX_STRING name,
906906
goto end;
907907
}
908908

909-
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
909+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
910910
ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST),
911911
"Event", name.str);
912912
ret= 0;

sql/event_parse_data.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Event_parse_data::check_if_in_the_past(THD *thd, my_time_t ltime_utc)
126126
{
127127
switch (thd->lex->sql_command) {
128128
case SQLCOM_CREATE_EVENT:
129-
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
129+
push_warning(thd, Sql_condition::WARN_LEVEL_NOTE,
130130
ER_EVENT_CANNOT_CREATE_IN_THE_PAST,
131131
ER(ER_EVENT_CANNOT_CREATE_IN_THE_PAST));
132132
break;
@@ -143,7 +143,7 @@ Event_parse_data::check_if_in_the_past(THD *thd, my_time_t ltime_utc)
143143
{
144144
status= Event_parse_data::DISABLED;
145145
status_changed= true;
146-
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
146+
push_warning(thd, Sql_condition::WARN_LEVEL_NOTE,
147147
ER_EVENT_EXEC_TIME_IN_THE_PAST,
148148
ER(ER_EVENT_EXEC_TIME_IN_THE_PAST));
149149
}

sql/event_scheduler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct scheduler_param {
7575
void
7676
Event_worker_thread::print_warnings(THD *thd, Event_job_data *et)
7777
{
78-
const MYSQL_ERROR *err;
78+
const Sql_condition *err;
7979
DBUG_ENTER("evex_print_warnings");
8080
if (thd->get_stmt_da()->is_warning_info_empty())
8181
DBUG_VOID_RETURN;

0 commit comments

Comments
 (0)