From: Martin Skold Date: April 26 2010 9:16am Subject: bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3183) Bug#31853 List-Archive: http://lists.mysql.com/commits/106483 X-Bug: 31853 Message-Id: <201004260916.o3Q9GVw6008207@quadfish.liljeholmen.mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///home/marty/MySQL/mysql-5.1-telco-6.3/ 3183 Martin Skold 2010-04-26 BUG#31853 Wrong error message on failed cluster create table after after mysqld (re)start if the return value of the member function get_default_no_partition() is less than 0, it means error happens modified: sql/sql_table.cc === modified file 'sql/sql_table.cc' --- a/sql/sql_table.cc 2010-03-12 10:36:52 +0000 +++ b/sql/sql_table.cc 2010-04-26 09:16:28 +0000 @@ -3798,7 +3798,10 @@ bool mysql_create_table_no_lock(THD *thd file->get_default_no_partitions(create_info)) { DBUG_ASSERT(thd->lex->sql_command != SQLCOM_CREATE_TABLE); - part_info->no_subparts= file->get_default_no_partitions(create_info); + int no_parts_tmp; + if (unlikely((no_parts_tmp= file->get_default_no_partitions(create_info)) < 0)) + goto err; + part_info->no_subparts= no_parts_tmp; } } else if (create_info->db_type != engine_type)