From: Martin Skold Date: April 26 2010 9:12am Subject: bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3181) Bug#31853 List-Archive: http://lists.mysql.com/commits/106481 X-Bug: 31853 Message-Id: <201004260912.o3Q9CN4d008009@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/ 3181 Martin Skold 2010-04-26 BUG#31853 Wrong error message on failed cluster create table after after mysqld (re)start if not connected to ndb cluster, will return HA_ERR_NO_CONNECTION error to user modified: sql/ha_ndbcluster.cc === modified file 'sql/ha_ndbcluster.cc' --- a/sql/ha_ndbcluster.cc 2010-04-16 08:12:51 +0000 +++ b/sql/ha_ndbcluster.cc 2010-04-26 09:12:20 +0000 @@ -11917,6 +11917,11 @@ int ha_ndbcluster::get_default_no_partit uint reported_frags; uint no_fragments= get_no_fragments(max_rows >= min_rows ? max_rows : min_rows); + if (unlikely(g_ndb_cluster_connection->get_no_ready() <= 0)) + { + my_error(HA_ERR_NO_CONNECTION, MYF(0)); + return -1; + } uint no_nodes= g_ndb_cluster_connection->no_db_nodes(); if (adjusted_frag_count(no_fragments, no_nodes, reported_frags)) {