diff options
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index e0e0d66ccb7..1c08df22755 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -200,7 +200,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (escaped->length() > 1 || enclosed->length() > 1) { - my_message(ER_WRONG_FIELD_TERMINATORS,ER(ER_WRONG_FIELD_TERMINATORS), + my_message(ER_WRONG_FIELD_TERMINATORS, + ER_THD(thd, ER_WRONG_FIELD_TERMINATORS), MYF(0)); DBUG_RETURN(TRUE); } @@ -212,7 +213,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, { push_warning(thd, Sql_condition::WARN_LEVEL_WARN, WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED, - ER(WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED)); + ER_THD(thd, WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED)); } if (open_and_lock_tables(thd, table_list, TRUE, 0)) @@ -323,7 +324,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } if (use_blobs && !ex->line_term->length() && !field_term->length()) { - my_message(ER_BLOBS_AND_NO_TERMINATED,ER(ER_BLOBS_AND_NO_TERMINATED), + my_message(ER_BLOBS_AND_NO_TERMINATED, + ER_THD(thd, ER_BLOBS_AND_NO_TERMINATED), MYF(0)); DBUG_RETURN(TRUE); } @@ -572,7 +574,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, error= -1; // Error on read goto err; } - sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted, + sprintf(name, ER_THD(thd, ER_LOAD_INFO), + (ulong) info.records, (ulong) info.deleted, (ulong) (info.records - info.copied), (long) thd->get_stmt_da()->current_statement_warn_count()); @@ -818,7 +821,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->cuted_fields++; /* Not enough fields */ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_TOO_FEW_RECORDS, - ER(ER_WARN_TOO_FEW_RECORDS), + ER_THD(thd, ER_WARN_TOO_FEW_RECORDS), thd->get_stmt_da()->current_row_for_warning()); /* Timestamp fields that are NOT NULL are autoupdated if there is no @@ -848,7 +851,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->cuted_fields++; /* To long row */ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_TOO_MANY_RECORDS, - ER(ER_WARN_TOO_MANY_RECORDS), + ER_THD(thd, ER_WARN_TOO_MANY_RECORDS), thd->get_stmt_da()->current_row_for_warning()); } @@ -884,7 +887,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->cuted_fields++; /* To long row */ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_TOO_MANY_RECORDS, - ER(ER_WARN_TOO_MANY_RECORDS), + ER_THD(thd, ER_WARN_TOO_MANY_RECORDS), thd->get_stmt_da()->current_row_for_warning()); } thd->get_stmt_da()->inc_current_row_for_warning(); @@ -1061,7 +1064,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->cuted_fields++; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_TOO_FEW_RECORDS, - ER(ER_WARN_TOO_FEW_RECORDS), + ER_THD(thd, ER_WARN_TOO_FEW_RECORDS), thd->get_stmt_da()->current_row_for_warning()); } else if (item->type() == Item::STRING_ITEM) @@ -1107,7 +1110,8 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, { thd->cuted_fields++; /* To long row */ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS), + ER_WARN_TOO_MANY_RECORDS, + ER_THD(thd, ER_WARN_TOO_MANY_RECORDS), thd->get_stmt_da()->current_row_for_warning()); if (thd->killed) DBUG_RETURN(1); @@ -1248,7 +1252,7 @@ read_xml_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->cuted_fields++; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_TOO_FEW_RECORDS, - ER(ER_WARN_TOO_FEW_RECORDS), + ER_THD(thd, ER_WARN_TOO_FEW_RECORDS), thd->get_stmt_da()->current_row_for_warning()); } else |