Commit 9de602d2 authored by unknown's avatar unknown

Fix windows pushbuild failure: the bug occured because

we didn't check for NULL value of the
lex_create_info->db_type pointer.
The pointer is NULL in the case, when the engine name is
unknown to the server. This happens with NDB on Windows.


sql/sql_table.cc:
  don't check pointer in the case, it is NULL
parent 79b03c66
...@@ -5043,8 +5043,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -5043,8 +5043,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
/* Disable alter of log tables to unsupported engine */ /* Disable alter of log tables to unsupported engine */
if ((table_kind == GENERAL_LOG || table_kind == SLOW_LOG) && if ((table_kind == GENERAL_LOG || table_kind == SLOW_LOG) &&
(lex_create_info->used_fields & HA_CREATE_USED_ENGINE) && (lex_create_info->used_fields & HA_CREATE_USED_ENGINE) &&
(!lex_create_info->db_type || /* unknown engine */
!(lex_create_info->db_type->db_type == DB_TYPE_MYISAM || !(lex_create_info->db_type->db_type == DB_TYPE_MYISAM ||
lex_create_info->db_type->db_type == DB_TYPE_CSV_DB)) lex_create_info->db_type->db_type == DB_TYPE_CSV_DB)))
{ {
my_error(ER_BAD_LOG_ENGINE, MYF(0)); my_error(ER_BAD_LOG_ENGINE, MYF(0));
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
......
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