List:Commits« Previous MessageNext Message »
From:jonas Date:May 29 2008 1:30pm
Subject:bk commit into 5.1 tree (jonas:1.2614) BUG#37039
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas.  When jonas 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, 2008-05-29 13:30:21+02:00, jonas@stripped +4 -0
  ndb - bug#37039
    certain table/data could cause backup to crash node
    include nullbits in length of mask (READ_PACKED header)

  mysql-test/suite/ndb/r/ndb_restore.result@stripped, 2008-05-29 13:30:18+02:00,
jonas@stripped +74 -5
    test

  mysql-test/suite/ndb/r/ndb_restore_compressed.result@stripped, 2008-05-29 13:30:18+02:00,
jonas@stripped +74 -5
    test

  mysql-test/suite/ndb/t/ndb_restore.test@stripped, 2008-05-29 13:30:18+02:00,
jonas@stripped +44 -5
    test

  storage/ndb/src/kernel/blocks/backup/Backup.cpp@stripped, 2008-05-29 13:30:18+02:00,
jonas@stripped +1 -1
    include nullbits in mask len

diff -Nrup a/mysql-test/suite/ndb/r/ndb_restore.result
b/mysql-test/suite/ndb/r/ndb_restore.result
--- a/mysql-test/suite/ndb/r/ndb_restore.result	2008-02-11 16:14:15 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_restore.result	2008-05-29 13:30:18 +02:00
@@ -119,6 +119,8 @@ INSERT INTO `t9_c` VALUES ('3g4jh8gar2t'
 CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 INSERT INTO t10_c VALUES (1),(2),(3);
 insert into t10_c values (10000),(2000),(3000);
+CREATE TABLE t11_c (a int, b00 int null, b01 int null,b02 int null,b03 int null,b04 int
null,b05 int null,b06 int null,b07 int null,b08 int null,b90 int null,b10 int null,b11
int null,b12 int null,b13 int null,b14 int null,b15 int null,b16 int null,b17 int
null,b18 int null,b19 int null,b20 int null,b21 int null,b22 int null,b23 int null,b24
int null,b25 int null,b26 int null,b27 int null,b28 int null,b29 int null,b30 int
null,b31 int null,b32 int null) engine = ndb;
+insert into t11_c values
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
 create table t1 engine=myisam as select * from t1_c;
 create table t2 engine=myisam as select * from t2_c;
 create table t3 engine=myisam as select * from t3_c;
@@ -129,6 +131,7 @@ create table t7 engine=myisam as select 
 create table t8 engine=myisam as select * from t8_c;
 create table t9 engine=myisam as select * from t9_c;
 create table t10 engine=myisam as select * from t10_c;
+create table t11 engine=myisam as select * from t11_c;
 ForceVarPart: 0
 ForceVarPart: 1
 CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
@@ -138,7 +141,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 ForceVarPart: 0
 ForceVarPart: 1
 select * from information_schema.columns where table_name = "t1_c";
@@ -245,6 +248,28 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
 select * from t10_c order by a;
 a
 1
@@ -297,7 +322,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 select count(*) from t1;
 count(*)
 5
@@ -397,7 +422,29 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 select count(*) from t1;
 count(*)
 5
@@ -497,7 +544,29 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
-drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
+drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
 DELETE FROM test.backup_info;
 LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
@@ -505,7 +574,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
 drop table if exists t2_c;
 520093696,<the_backup_id>
 select epoch from mysql.ndb_apply_status where server_id=0;
diff -Nrup a/mysql-test/suite/ndb/r/ndb_restore_compressed.result
b/mysql-test/suite/ndb/r/ndb_restore_compressed.result
--- a/mysql-test/suite/ndb/r/ndb_restore_compressed.result	2008-01-31 13:40:17 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_restore_compressed.result	2008-05-29 13:30:18 +02:00
@@ -119,6 +119,8 @@ INSERT INTO `t9_c` VALUES ('3g4jh8gar2t'
 CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 INSERT INTO t10_c VALUES (1),(2),(3);
 insert into t10_c values (10000),(2000),(3000);
+CREATE TABLE t11_c (a int, b00 int null, b01 int null,b02 int null,b03 int null,b04 int
null,b05 int null,b06 int null,b07 int null,b08 int null,b90 int null,b10 int null,b11
int null,b12 int null,b13 int null,b14 int null,b15 int null,b16 int null,b17 int
null,b18 int null,b19 int null,b20 int null,b21 int null,b22 int null,b23 int null,b24
int null,b25 int null,b26 int null,b27 int null,b28 int null,b29 int null,b30 int
null,b31 int null,b32 int null) engine = ndb;
+insert into t11_c values
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
 create table t1 engine=myisam as select * from t1_c;
 create table t2 engine=myisam as select * from t2_c;
 create table t3 engine=myisam as select * from t3_c;
@@ -129,6 +131,7 @@ create table t7 engine=myisam as select 
 create table t8 engine=myisam as select * from t8_c;
 create table t9 engine=myisam as select * from t9_c;
 create table t10 engine=myisam as select * from t10_c;
+create table t11 engine=myisam as select * from t11_c;
 ForceVarPart: 0
 ForceVarPart: 1
 CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
@@ -138,7 +141,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 ForceVarPart: 0
 ForceVarPart: 1
 select * from information_schema.columns where table_name = "t1_c";
@@ -245,6 +248,28 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
 select * from t10_c order by a;
 a
 1
@@ -297,7 +322,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 select count(*) from t1;
 count(*)
 5
@@ -397,7 +422,29 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 select count(*) from t1;
 count(*)
 5
@@ -497,7 +544,29 @@ from (select * from t9 union 
 select * from t9_c) a;
 count(*)
 3
-drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+select count(*) from t10;
+count(*)
+6
+select count(*) from t10_c;
+count(*)
+6
+select count(*)
+from (select * from t10 union 
+select * from t10_c) a;
+count(*)
+6
+select count(*) from t11;
+count(*)
+1
+select count(*) from t11_c;
+count(*)
+1
+select count(*)
+from (select * from t11 union 
+select * from t11_c) a;
+count(*)
+1
+drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE =
HEAP;
 DELETE FROM test.backup_info;
 LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
@@ -505,7 +574,7 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
 drop table if exists t2_c;
 520093696,<the_backup_id>
 select epoch from mysql.ndb_apply_status where server_id=0;
diff -Nrup a/mysql-test/suite/ndb/t/ndb_restore.test
b/mysql-test/suite/ndb/t/ndb_restore.test
--- a/mysql-test/suite/ndb/t/ndb_restore.test	2008-02-11 16:14:15 +01:00
+++ b/mysql-test/suite/ndb/t/ndb_restore.test	2008-05-29 13:30:18 +02:00
@@ -154,6 +154,9 @@ INSERT INTO t10_c VALUES (1),(2),(3);
 #            - check int
 insert into t10_c values (10000),(2000),(3000);
 
+CREATE TABLE t11_c (a int, b00 int null, b01 int null,b02 int null,b03 int null,b04 int
null,b05 int null,b06 int null,b07 int null,b08 int null,b90 int null,b10 int null,b11
int null,b12 int null,b13 int null,b14 int null,b15 int null,b16 int null,b17 int
null,b18 int null,b19 int null,b20 int null,b21 int null,b22 int null,b23 int null,b24
int null,b25 int null,b26 int null,b27 int null,b28 int null,b29 int null,b30 int
null,b31 int null,b32 int null) engine = ndb;
+insert into t11_c values
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
+
 create table t1 engine=myisam as select * from t1_c;
 create table t2 engine=myisam as select * from t2_c;
 create table t3 engine=myisam as select * from t3_c;
@@ -164,6 +167,7 @@ create table t7 engine=myisam as select 
 create table t8 engine=myisam as select * from t8_c;
 create table t9 engine=myisam as select * from t9_c;
 create table t10 engine=myisam as select * from t10_c;
+create table t11 engine=myisam as select * from t11_c;
 
 # check that force varpart is preserved by ndb_restore
 # t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0
@@ -171,7 +175,7 @@ create table t10 engine=myisam as select
 --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart
 
 --source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 # check that force varpart is preserved by ndb_restore
@@ -243,6 +247,18 @@ select count(*)
   from (select * from t9 union 
         select * from t9_c) a;
 
+select count(*) from t10;
+select count(*) from t10_c;
+select count(*)
+  from (select * from t10 union 
+        select * from t10_c) a;
+
+select count(*) from t11;
+select count(*) from t11_c;
+select count(*)
+  from (select * from t11 union 
+        select * from t11_c) a;
+
 # Bug #20820 cont'd
 select * from t10_c order by a;
 # Bug #27775 cont'd
@@ -270,7 +286,7 @@ ALTER TABLE t7_c
 PARTITION BY LINEAR KEY (`dardtestard`);
 
 --source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 
@@ -328,7 +344,19 @@ select count(*)
   from (select * from t9 union 
         select * from t9_c) a;
 
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+select count(*) from t10;
+select count(*) from t10_c;
+select count(*)
+  from (select * from t10 union 
+        select * from t10_c) a;
+
+select count(*) from t11;
+select count(*) from t11_c;
+select count(*)
+  from (select * from t11 union 
+        select * from t11_c) a;
+
+drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r
--ndb-nodegroup_map '(0,0)' --print --print_meta
$NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print
--print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
 
@@ -386,13 +414,24 @@ select count(*)
   from (select * from t9 union 
         select * from t9_c) a;
 
+select count(*) from t10;
+select count(*) from t10_c;
+select count(*)
+  from (select * from t10 union 
+        select * from t10_c) a;
+
+select count(*) from t11;
+select count(*) from t11_c;
+select count(*)
+  from (select * from t11 union 
+        select * from t11_c) a;
 #
 # Drop all table except t2_c
 #   This to make sure that error returned from ndb_restore above is 
 #     guaranteed to be from t2_c, this since order of tables in backup
 #     is none deterministic
 # 
-drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
+drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 --source include/ndb_backup.inc
 --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r
--ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 |
grep Translate || true
 
@@ -401,7 +440,7 @@ drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c
 #
 
 --disable_warnings
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
 drop table if exists t2_c;
 --enable_warnings
 
diff -Nrup a/storage/ndb/src/kernel/blocks/backup/Backup.cpp
b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2008-05-17 00:35:23 +02:00
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2008-05-29 13:30:18 +02:00
@@ -3446,7 +3446,7 @@ Backup::parseTableDescription(Signal* si
   else
   {
     // mask
-    tabPtr.p->maxRecordSize += 1 + ((tmpTab.NoOfAttributes + 31) >> 5);
+    tabPtr.p->maxRecordSize += 1 + ((tmpTab.NoOfAttributes + null + 31) >> 5);
     tabPtr.p->maxRecordSize += (2 * varsize + 3) / 4;
   }
 
Thread
bk commit into 5.1 tree (jonas:1.2614) BUG#37039jonas29 May