From 5431ecb593b1eff9d71b629b638d65458d286a4d Mon Sep 17 00:00:00 2001 From: "petr/cps@mysql.com/owlet." <> Date: Tue, 8 Aug 2006 12:03:24 +0400 Subject: [PATCH] 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3e218f7d33e..5325758fd12 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5043,8 +5043,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, /* Disable alter of log tables to unsupported engine */ if ((table_kind == GENERAL_LOG || table_kind == SLOW_LOG) && (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_CSV_DB)) + lex_create_info->db_type->db_type == DB_TYPE_CSV_DB))) { my_error(ER_BAD_LOG_ENGINE, MYF(0)); DBUG_RETURN(TRUE);