From: holyfoot Date: March 27 2007 1:39pm Subject: bk commit into 5.1 tree (holyfoot:1.2505) BUG#27359 List-Archive: http://lists.mysql.com/commits/23006 X-Bug: 27359 Message-Id: <20070327133915.B2D5F2C380B7@hfmain.localdomain> Below is the list of changes that have just been committed into a local 5.1 repository of hf. When hf does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-03-27 18:39:11+05:00, holyfoot@stripped +4 -0 Bug #27359 Partition: memory allocation error message if ndbcluster's nodes aren't set, the handlerton can return zero partitions in the partitioned table. So we should check for that. mysql-test/r/ndb_partition_error2.result@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +3 -0 New BitKeeper file ``mysql-test/r/ndb_partition_error2.result'' mysql-test/r/ndb_partition_error2.result@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +0 -0 mysql-test/t/ndb_partition_error2-master.opt@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +1 -0 New BitKeeper file ``mysql-test/t/ndb_partition_error2-master.opt'' mysql-test/t/ndb_partition_error2-master.opt@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +0 -0 mysql-test/t/ndb_partition_error2.test@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +14 -0 New BitKeeper file ``mysql-test/t/ndb_partition_error2.test'' mysql-test/t/ndb_partition_error2.test@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +0 -0 sql/partition_info.cc@stripped, 2007-03-27 18:39:09+05:00, holyfoot@stripped +5 -1 check for zero return added # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: holyfoot # Host: hfmain.(none) # Root: /home/hf/work/27359/my51-27359 --- New file --- +++ mysql-test/r/ndb_partition_error2.result 07/03/27 18:39:09 drop table if exists t1; create table t1 (s1 int) engine=ndbcluster; ERROR HY000: For the partitioned engine it is necessary to define all partition --- New file --- +++ mysql-test/t/ndb_partition_error2-master.opt 07/03/27 18:39:09 --ndbcluster --- New file --- +++ mysql-test/t/ndb_partition_error2.test 07/03/27 18:39:09 disable_query_log; --require r/true.require select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; enable_query_log; --disable_warnings drop table if exists t1; --enable_warnings # # Bug #27359 Partitions: memory allocation error message # --error ER_PARTITION_NOT_DEFINED_ERROR create table t1 (s1 int) engine=ndbcluster; --- 1.34/sql/partition_info.cc 2007-03-27 18:39:15 +05:00 +++ 1.35/sql/partition_info.cc 2007-03-27 18:39:15 +05:00 @@ -753,7 +753,11 @@ bool partition_info::check_partition_inf } if (unlikely(set_up_defaults_for_partitioning(file, info, (uint)0))) goto end; - tot_partitions= get_tot_partitions(); + if (!(tot_partitions= get_tot_partitions())) + { + my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions"); + goto end; + } if (unlikely(tot_partitions > MAX_PARTITIONS)) { my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0));