Commit 2d05a65c authored by unknown's avatar unknown

Try to fix assertion failures at slave shutdown when running

rpl_ndb tests on sapsrv1.


sql/ha_ndbcluster_binlog.cc:
  Try to fix assertion failures at slave shutdown when running
  rpl_ndb tests. If the binlog thread is killed, which happens during
  shutdown, open_tables returns error without setting an error
  in THD. Therefore one can't access thd->main_da.message() if thd->killed.
parent c559c8bc
...@@ -2326,6 +2326,9 @@ static int open_ndb_binlog_index(THD *thd, TABLE_LIST *tables, ...@@ -2326,6 +2326,9 @@ static int open_ndb_binlog_index(THD *thd, TABLE_LIST *tables,
thd->clear_error(); thd->clear_error();
if (open_tables(thd, &tables, &counter, MYSQL_LOCK_IGNORE_FLUSH)) if (open_tables(thd, &tables, &counter, MYSQL_LOCK_IGNORE_FLUSH))
{ {
if (thd->killed)
sql_print_error("NDB Binlog: Opening ndb_binlog_index: killed");
else
sql_print_error("NDB Binlog: Opening ndb_binlog_index: %d, '%s'", sql_print_error("NDB Binlog: Opening ndb_binlog_index: %d, '%s'",
thd->main_da.sql_errno(), thd->main_da.sql_errno(),
thd->main_da.message()); thd->main_da.message());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment