137
137
slider += len, err= it++)
139
139
len= snprintf(slider, buff_end - slider,
140
" %s, Error_code: %d;", err->msg, err->code);
140
_(" %s, Error_code: %d;"), err->msg, err->code);
143
143
rli->report(level, thd->is_error()? thd->main_da.sql_errno() : 0,
144
"Could not execute %s event on table %s.%s;"
145
"%s handler error %s; "
146
"the event's master log %s, end_log_pos %lu",
144
_("Could not execute %s event on table %s.%s;"
145
"%s handler error %s; "
146
"the event's master log %s, end_log_pos %lu"),
147
147
type, table->s->db.str,
148
148
table->s->table_name.str,
150
handler_error == NULL? "<unknown>" : handler_error,
150
handler_error == NULL? _("<unknown>") : handler_error,
2278
2278
clear_all_errors(thd, const_cast<Relay_log_info*>(rli)); /* Can ignore query */
2281
rli->report(ERROR_LEVEL, expected_error,
2283
Query partially completed on the master (error on master: %d) \
2284
and was aborted. There is a chance that your master is inconsistent at this \
2285
point. If you are sure that your master is ok, run this query manually on the \
2286
slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; \
2287
START SLAVE; . Query: '%s'", expected_error, thd->query);
2281
rli->report(ERROR_LEVEL, expected_error,
2282
_("Query partially completed on the master "
2283
"(error on master: %d) and was aborted. There is a "
2284
"chance that your master is inconsistent at this "
2285
"point. If you are sure that your master is ok, run "
2286
"this query manually on the slave and then restart the "
2287
"slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; "
2288
"START SLAVE; . Query: '%s'"),
2289
expected_error, thd->query);
2288
2290
thd->is_slave_error= 1;
2303
2305
actual_error= thd->is_error() ? thd->main_da.sql_errno() : 0;
2304
2306
if ((expected_error != actual_error) &&
2306
!ignored_error_code(actual_error) &&
2307
!ignored_error_code(expected_error))
2308
!ignored_error_code(actual_error) &&
2309
!ignored_error_code(expected_error))
2309
2311
rli->report(ERROR_LEVEL, 0,
2311
Query caused different errors on master and slave. \
2312
Error on master: '%s' (%d), Error on slave: '%s' (%d). \
2313
Default database: '%s'. Query: '%s'",
2314
ER_SAFE(expected_error),
2316
actual_error ? thd->main_da.message() : "no error",
2318
print_slave_db_safe(db), query_arg);
2312
_("Query caused differenxt errors on master and slave.\n"
2313
"Error on master: '%s' (%d), Error on slave: '%s' (%d).\n"
2314
"Default database: '%s'. Query: '%s'"),
2315
ER_SAFE(expected_error),
2317
actual_error ? thd->main_da.message() : _("no error"),
2319
print_slave_db_safe(db), query_arg);
2319
2320
thd->is_slave_error= 1;
2333
2334
else if (thd->is_slave_error || thd->is_fatal_error)
2335
2336
rli->report(ERROR_LEVEL, actual_error,
2336
"Error '%s' on query. Default database: '%s'. Query: '%s'",
2337
(actual_error ? thd->main_da.message() :
2338
"unexpected success or fatal error"),
2337
_("Error '%s' on query. Default database: '%s'. Query: '%s'"),
2338
(actual_error ? thd->main_da.message() :
2339
_("unexpected success or fatal error")),
2339
2340
print_slave_db_safe(thd->db), query_arg);
2340
2341
thd->is_slave_error= 1;
2914
2915
/* This is not an error (XA is safe), just an information */
2915
2916
rli->report(INFORMATION_LEVEL, 0,
2916
"Rolling back unfinished transaction (no COMMIT "
2917
"or ROLLBACK in relay log). A probable cause is that "
2918
"the master died while writing the transaction to "
2919
"its binary log, thus rolled back too.");
2917
_("Rolling back unfinished transaction (no COMMIT "
2918
"or ROLLBACK in relay log). A probable cause is that "
2919
"the master died while writing the transaction to "
2920
"its binary log, thus rolled back too."));
2920
2921
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, 1);
3741
3742
sql_errno=ER_UNKNOWN_ERROR;
3744
rli->report(ERROR_LEVEL, sql_errno,"\
3745
Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
3746
err, (char*)table_name, print_slave_db_safe(remember_db));
3745
rli->report(ERROR_LEVEL, sql_errno,
3746
_("Error '%s' running LOAD DATA INFILE on table '%s'. "
3747
"Default database: '%s'"),
3748
err, (char*)table_name, print_slave_db_safe(remember_db));
3747
3749
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
3755
3757
snprintf(buf, sizeof(buf),
3756
"Running LOAD DATA INFILE on table '%-.64s'."
3757
" Default database: '%-.64s'",
3758
_("Running LOAD DATA INFILE on table '%-.64s'."
3759
" Default database: '%-.64s'"),
3758
3760
(char*)table_name,
3759
3761
print_slave_db_safe(remember_db));
5088
5090
MYF(MY_WME|MY_NABP)))
5090
5092
rli->report(ERROR_LEVEL, my_errno,
5091
"Error in Create_file event: could not open file '%s'",
5093
_("Error in Create_file event: could not open file '%s'"),
5101
5103
stpcpy(ext, ".info"); // to have it right in the error message
5102
5104
rli->report(ERROR_LEVEL, my_errno,
5103
"Error in Create_file event: could not write to file '%s'",
5105
_("Error in Create_file event: could not write to file '%s'"),
5107
5109
end_io_cache(&file);
5108
5110
my_close(fd, MYF(0));
5110
5112
// fname_buf now already has .data, not .info, because we did our trick
5111
5113
my_delete(fname_buf, MYF(0)); // old copy may exist already
5112
5114
if ((fd= my_create(fname_buf, CREATE_MODE,
5113
O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
5115
O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
5116
5118
rli->report(ERROR_LEVEL, my_errno,
5117
"Error in Create_file event: could not open file '%s'",
5119
_("Error in Create_file event: could not open file '%s'"),
5121
5123
if (my_write(fd, (uchar*) block, block_len, MYF(MY_WME+MY_NABP)))
5123
5125
rli->report(ERROR_LEVEL, my_errno,
5124
"Error in Create_file event: write to '%s' failed",
5126
_("Error in Create_file event: write to '%s' failed"),
5260
5262
MYF(MY_WME))) < 0)
5262
5264
rli->report(ERROR_LEVEL, my_errno,
5263
"Error in %s event: could not create file '%s'",
5265
_("Error in %s event: could not create file '%s'"),
5264
5266
get_type_str(), fname);
5269
5271
MYF(MY_WME))) < 0)
5271
5273
rli->report(ERROR_LEVEL, my_errno,
5272
"Error in %s event: could not open file '%s'",
5274
_("Error in %s event: could not open file '%s'"),
5273
5275
get_type_str(), fname);
5276
5278
if (my_write(fd, (uchar*) block, block_len, MYF(MY_WME+MY_NABP)))
5278
5280
rli->report(ERROR_LEVEL, my_errno,
5279
"Error in %s event: write to '%s' failed",
5281
_("Error in %s event: write to '%s' failed"),
5280
5282
get_type_str(), fname);
5487
5489
MYF(MY_WME|MY_NABP)))
5489
5491
rli->report(ERROR_LEVEL, my_errno,
5490
"Error in Exec_load event: could not open file '%s'",
5492
_("Error in Exec_load event: could not open file '%s'"),
5496
5498
rli->relay_log.description_event_for_exec)) ||
5497
5499
lev->get_type_code() != NEW_LOAD_EVENT)
5499
rli->report(ERROR_LEVEL, 0, "Error in Exec_load event: "
5500
"file '%s' appears corrupted", fname);
5501
rli->report(ERROR_LEVEL, 0,
5502
_("Error in Exec_load event: "
5503
"file '%s' appears corrupted"),
5527
5531
rli->report(ERROR_LEVEL, rli->last_error().number,
5528
"%s. Failed executing load from '%s'", tmp, fname);
5532
_("%s. Failed executing load from '%s'"),
5529
5534
my_free(tmp,MYF(0));
5751
5756
if (buf == NULL)
5753
5758
rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
5754
ER(ER_SLAVE_FATAL_ERROR), "Not enough memory");
5759
ER(ER_SLAVE_FATAL_ERROR),
5760
_("Not enough memory"));
6197
6203
uint actual_error= thd->main_da.sql_errno();
6198
6204
rli->report(ERROR_LEVEL, actual_error,
6199
"Error '%s' in %s event: when locking tables",
6200
(actual_error ? thd->main_da.message():
6201
"unexpected success or fatal error"),
6205
_("Error '%s' in %s event: when locking tables"),
6207
? thd->main_da.message()
6208
: _("unexpected success or fatal error")),
6202
6209
get_type_str());
6203
6210
thd->is_fatal_error= 1;
6207
6214
rli->report(ERROR_LEVEL, error,
6208
"Error in %s event: when locking tables",
6215
_("Error in %s event: when locking tables"),
6209
6216
get_type_str());
6211
6218
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
6241
6248
uint actual_error= thd->main_da.sql_errno();
6242
6249
rli->report(ERROR_LEVEL, actual_error,
6243
"Error '%s' on reopening tables",
6244
(actual_error ? thd->main_da.message() :
6245
"unexpected success or fatal error"));
6250
_("Error '%s' on reopening tables"),
6252
? thd->main_da.message()
6253
: _("unexpected success or fatal error")));
6246
6254
thd->is_slave_error= 1;
6248
6256
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
6597
6605
rli->report(ERROR_LEVEL, error,
6598
"Error in %s event: commit of row events failed, "
6606
_("Error in %s event: commit of row events failed, "
6600
6608
get_type_str(), m_table->s->db.str,
6601
6609
m_table->s->table_name.str);
7048
7056
uint actual_error= thd->main_da.sql_errno();
7049
7057
rli->report(ERROR_LEVEL, actual_error,
7050
"Error '%s' on opening table `%s`.`%s`",
7051
(actual_error ? thd->main_da.message() :
7052
"unexpected success or fatal error"),
7058
_("Error '%s' on opening table `%s`.`%s`"),
7060
? thd->main_da.message()
7061
: _("unexpected success or fatal error")),
7053
7062
table_list->db, table_list->table_name);
7054
7063
thd->is_slave_error= 1;