List:Commits« Previous MessageNext Message »
From:Martin Skold Date:December 8 2009 1:26pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (Martin.Skold:3266) Bug#42046
View as plain text  
#At file:///home/marty/MySQL/mysql-5.1-telco-7.0/

 3266 Martin Skold	2009-12-08 [merge]
      Bug#42046 MySQL Cluster : Too many BIT columns causes cluster failure: Added check and return new error code
      modified:
        mysql-test/suite/ndb/r/ndb_bitfield.result
        mysql-test/suite/ndb/t/ndb_bitfield.test
        storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
        storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
        storage/ndb/src/ndbapi/ndberror.c

=== modified file 'mysql-test/suite/ndb/r/ndb_bitfield.result'
--- a/mysql-test/suite/ndb/r/ndb_bitfield.result	2007-08-21 13:55:03 +0000
+++ b/mysql-test/suite/ndb/r/ndb_bitfield.result	2009-12-07 10:56:45 +0000
@@ -244,3 +244,9 @@ b bit(32) not null
 ) engine=ndbcluster;
 insert into t1 values (1,1);
 drop table t1;
+create table bigbits ( k int unsigned primary key, c1 bit(64), c2 bit(64), c3 bit(64), c4 bit(64), c5 bit(64), c6 bit(64), c7 bit(64), c8 bit(64), c9 bit(64), c10 bit(64), c11 bit(64), c12 bit(64), c13 bit(64), c14 bit(64), c15 bit(64), c16 bit(64), c17 bit(64), c18 bit(64), c19 bit(64), c20 bit(64), c21 bit(64), c22 bit(64), c23 bit(64), c24 bit(64), c25 bit(64), c26 bit(64), c27 bit(64), c28 bit(64), c29 bit(64), c30 bit(64), c31 bit(64), c32 bit(64), c33 bit(64), c34 bit(64), c35 bit(64), c36 bit(64), c37 bit(64), c38 bit(64), c39 bit(64), c40 bit(64), c41 bit(64), c42 bit(64), c43 bit(64), c44 bit(64), c45 bit(64), c46 bit(64), c47 bit(64), c48 bit(64), c49 bit(64), c50 bit(64), c51 bit(64), c52 bit(64), c53 bit(64), c54 bit(64), c55 bit(64), c56 bit(64), c57 bit(64), c58 bit(64), c59 bit(64), c60 bit(64), c61 bit(64), c62 bit(64), c63 bit(64), c64 bit(64), c65 bit(64), c66 bit(64), c67 bit(64), c68 bit(64), c69 bit(64), c70 bit(64), c71 bit(64), c72 bit(64), c73 bit(64!
 ), c74 bit(64), c75 bit(64), c76 bit(64), c77 bit(64), c78 bit(64), c79 bit(64), c80 bit(64), c81 bit(64), c82 bit(64), c83 bit(64), c84 bit(64), c85 bit(64), c86 bit(64), c87 bit(64), c88 bit(64), c89 bit(64), c90 bit(64), c91 bit(64), c92 bit(64), c93 bit(64), c94 bit(64), c95 bit(64), c96 bit(64), c97 bit(64), c98 bit(64), c99 bit(64), c100 bit(64), c101 bit(64), c102 bit(64), c103 bit(64), c104 bit(64), c105 bit(64), c106 bit(64), c107 bit(64), c108 bit(64), c109 bit(64), c110 bit(64), c111 bit(64), c112 bit(64), c113 bit(64), c114 bit(64), c115 bit(64), c116 bit(64), c117 bit(64), c118 bit(64), c119 bit(64), c120 bit(64), c121 bit(64), c122 bit(64), c123 bit(64), c124 bit(64), c125 bit(64), c126 bit(64)) engine=ndb;
+ERROR HY000: Can't create table 'test.bigbits' (errno: 140)
+show warnings;
+Level	Code	Message
+Error	1296	Got error 791 'Too many total bits in bitfields' from NDB
+Error	1005	Can't create table 'test.bigbits' (errno: 140)

=== modified file 'mysql-test/suite/ndb/t/ndb_bitfield.test'
--- a/mysql-test/suite/ndb/t/ndb_bitfield.test	2007-11-29 10:29:35 +0000
+++ b/mysql-test/suite/ndb/t/ndb_bitfield.test	2009-12-07 10:56:45 +0000
@@ -137,3 +137,9 @@ create table t1 (
 
 insert into t1 values (1,1);
 drop table t1;
+
+# Bug#42046   MySQL Cluster : Too many BIT columns causes cluster failure
+
+--error 1005
+create table bigbits ( k int unsigned primary key, c1 bit(64), c2 bit(64), c3 bit(64), c4 bit(64), c5 bit(64), c6 bit(64), c7 bit(64), c8 bit(64), c9 bit(64), c10 bit(64), c11 bit(64), c12 bit(64), c13 bit(64), c14 bit(64), c15 bit(64), c16 bit(64), c17 bit(64), c18 bit(64), c19 bit(64), c20 bit(64), c21 bit(64), c22 bit(64), c23 bit(64), c24 bit(64), c25 bit(64), c26 bit(64), c27 bit(64), c28 bit(64), c29 bit(64), c30 bit(64), c31 bit(64), c32 bit(64), c33 bit(64), c34 bit(64), c35 bit(64), c36 bit(64), c37 bit(64), c38 bit(64), c39 bit(64), c40 bit(64), c41 bit(64), c42 bit(64), c43 bit(64), c44 bit(64), c45 bit(64), c46 bit(64), c47 bit(64), c48 bit(64), c49 bit(64), c50 bit(64), c51 bit(64), c52 bit(64), c53 bit(64), c54 bit(64), c55 bit(64), c56 bit(64), c57 bit(64), c58 bit(64), c59 bit(64), c60 bit(64), c61 bit(64), c62 bit(64), c63 bit(64), c64 bit(64), c65 bit(64), c66 bit(64), c67 bit(64), c68 bit(64), c69 bit(64), c70 bit(64), c71 bit(64), c72 bit(64), c73 bit(64!
 ), c74 bit(64), c75 bit(64), c76 bit(64), c77 bit(64), c78 bit(64), c79 bit(64), c80 bit(64), c81 bit(64), c82 bit(64), c83 bit(64), c84 bit(64), c85 bit(64), c86 bit(64), c87 bit(64), c88 bit(64), c89 bit(64), c90 bit(64), c91 bit(64), c92 bit(64), c93 bit(64), c94 bit(64), c95 bit(64), c96 bit(64), c97 bit(64), c98 bit(64), c99 bit(64), c100 bit(64), c101 bit(64), c102 bit(64), c103 bit(64), c104 bit(64), c105 bit(64), c106 bit(64), c107 bit(64), c108 bit(64), c109 bit(64), c110 bit(64), c111 bit(64), c112 bit(64), c113 bit(64), c114 bit(64), c115 bit(64), c116 bit(64), c117 bit(64), c118 bit(64), c119 bit(64), c120 bit(64), c121 bit(64), c122 bit(64), c123 bit(64), c124 bit(64), c125 bit(64), c126 bit(64)) engine=ndb;
+show warnings;

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-11-12 21:25:49 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-12-08 13:26:22 +0000
@@ -273,6 +273,8 @@ inline const Uint32* ALIGN_WORD(const vo
 #define ZROWID_ALLOCATED 899
 #define ZINVALID_ALTER_TAB 741
 
+#define ZTOO_MANY_BITS_ERROR 791
+
           /* SOME WORD POSITIONS OF FIELDS IN SOME HEADERS */
 
 #define ZTH_MM_FREE 3                     /* PAGE STATE, TUPLE HEADER PAGE WITH FREE AREA      */

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2009-09-21 12:17:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2009-12-08 13:26:22 +0000
@@ -213,7 +213,12 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* 
       jam();
       regTabPtr.p->m_attributes[ind].m_no_of_varsize++;
     }
-    
+    if (null_pos > AO_NULL_FLAG_POS_MASK)
+    {
+      jam();
+      terrorCode = ZTOO_MANY_BITS_ERROR;
+      goto error;
+    }      
     AttributeOffset::setNullFlagPos(attrDes2, null_pos);
   } else {
     /* A dynamic attribute. */

=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c	2009-11-18 11:05:02 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c	2009-12-08 13:26:22 +0000
@@ -401,6 +401,7 @@ ErrorBundle ErrorCodes[] = {
   { 772,  HA_WRONG_CREATE_OPTION, IE, "Given fragmentType doesn't exist" },
   { 749,  HA_WRONG_CREATE_OPTION, IE, "Primary Table in wrong state" },
   { 779,  HA_WRONG_CREATE_OPTION, SE, "Invalid undo buffer size" },
+  { 791,  HA_WRONG_CREATE_OPTION, SE, "Too many total bits in bitfields" },
   { 764,  HA_WRONG_CREATE_OPTION, SE, "Invalid extent size" },
   { 765,  DMEC, SE, "Out of filegroup records" },
   { 750,  IE, SE, "Invalid file type" },

Thread
bzr commit into mysql-5.1-telco-7.0 branch (Martin.Skold:3266) Bug#42046Martin Skold8 Dec