1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BUG#17521 alter database crashes slave

Problem was a null pointer
Fixed by passing correct database name to slave filtering mechanism
Added test.


sql/sql_parse.cc:
  Fix slave crash when issuing 'ALTER DATABASE' with specifying db name
  Don't pass null pointer to db_ok_with_wild_table()
This commit is contained in:
unknown
2006-02-23 23:20:29 -05:00
parent b9697b2056
commit c6ee60933d
3 changed files with 21 additions and 3 deletions

View File

@@ -3715,7 +3715,7 @@ end_with_restore_list:
}
if (!strip_sp(db) || check_db_name(db))
{
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name);
my_error(ER_WRONG_DB_NAME, MYF(0), db);
break;
}
/*
@@ -3727,8 +3727,8 @@ end_with_restore_list:
*/
#ifdef HAVE_REPLICATION
if (thd->slave_thread &&
(!rpl_filter->db_ok(lex->name) ||
!rpl_filter->db_ok_with_wild_table(lex->name)))
(!rpl_filter->db_ok(db) ||
!rpl_filter->db_ok_with_wild_table(db)))
{
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
break;