List:Commits« Previous MessageNext Message »
From:jonas oreland Date:August 3 2008 9:03pm
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:2642)
View as plain text  
#At file:///home/jonas/bzr/telco-6.3/

 2642 jonas oreland	2008-08-03 [merge]
      merge bk-internal:telco-6.3 into eel:telco-6.3
modified:
  mysql-test/suite/ndb/r/ndb_restore.result
  mysql-test/suite/ndb/r/ndb_restore_compressed.result
  mysql-test/suite/ndb/t/ndb_restore.test
  storage/ndb/src/common/logger/Logger.cpp
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
  storage/ndb/src/mgmsrv/MgmtSrvr.cpp
  storage/ndb/test/ndbapi/testOIBasic.cpp
  storage/ndb/tools/restore/restore_main.cpp

=== modified file 'mysql-test/suite/ndb/r/ndb_restore.result'
--- a/mysql-test/suite/ndb/r/ndb_restore.result	2008-05-29 11:30:21 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore.result	2008-07-24 10:57:58 +0000
@@ -574,8 +574,29 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
+CREATE TABLE t11_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+CREATE TABLE t12_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO t11_c VALUES(1, "aaaaa", "bbbbb"), (2, "ccccc", "ddddd"), (3, "eeeee","fffff");
+INSERT INTO t12_c VALUES(4, "ggggg", "hhhhh"), (5, "iiiii", "jjjjj"), (6, "kkkkk","lllll");
+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 ',';
+SELECT @the_backup_id:=backup_id FROM test.backup_info;
+@the_backup_id:=backup_id
+<the_backup_id>
+DROP TABLE test.backup_info;
+drop table t2_c,t11_c,t12_c;
+SELECT * FROM t11_c ORDER BY c1;
+c1	c2	c3
+1	aaaaa	bbbbb
+2	ccccc	ddddd
+3	eeeee	fffff
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
-drop table if exists t2_c;
+drop table if exists t2_c,t11_c,t12_c;
 520093696,<the_backup_id>
 select epoch from mysql.ndb_apply_status where server_id=0;
 epoch

=== modified file 'mysql-test/suite/ndb/r/ndb_restore_compressed.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_compressed.result	2008-05-29 11:30:21 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_compressed.result	2008-07-24 10:57:58 +0000
@@ -574,8 +574,29 @@ SELECT @the_backup_id:=backup_id FROM te
 @the_backup_id:=backup_id
 <the_backup_id>
 DROP TABLE test.backup_info;
+CREATE TABLE t11_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+CREATE TABLE t12_c (
+c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO t11_c VALUES(1, "aaaaa", "bbbbb"), (2, "ccccc", "ddddd"), (3, "eeeee","fffff");
+INSERT INTO t12_c VALUES(4, "ggggg", "hhhhh"), (5, "iiiii", "jjjjj"), (6, "kkkkk","lllll");
+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 ',';
+SELECT @the_backup_id:=backup_id FROM test.backup_info;
+@the_backup_id:=backup_id
+<the_backup_id>
+DROP TABLE test.backup_info;
+drop table t2_c,t11_c,t12_c;
+SELECT * FROM t11_c ORDER BY c1;
+c1	c2	c3
+1	aaaaa	bbbbb
+2	ccccc	ddddd
+3	eeeee	fffff
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
-drop table if exists t2_c;
+drop table if exists t2_c,t11_c,t12_c;
 520093696,<the_backup_id>
 select epoch from mysql.ndb_apply_status where server_id=0;
 epoch

=== modified file 'mysql-test/suite/ndb/t/ndb_restore.test'
--- a/mysql-test/suite/ndb/t/ndb_restore.test	2008-06-18 21:19:57 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore.test	2008-07-24 10:57:58 +0000
@@ -435,13 +435,31 @@ drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_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
 
+CREATE TABLE t11_c (
+  c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+
+CREATE TABLE t12_c (
+  c1 int primary key, c2 char(10), c3 varchar(10)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+
+INSERT INTO t11_c VALUES(1, "aaaaa", "bbbbb"), (2, "ccccc", "ddddd"), (3, "eeeee","fffff");
+INSERT INTO t12_c VALUES(4, "ggggg", "hhhhh"), (5, "iiiii", "jjjjj"), (6, "kkkkk","lllll");
+--source include/ndb_backup.inc
+drop table t2_c,t11_c,t12_c;
+# Only part of tables is restored, it should work
+--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 test t11_c >> $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 test t11_c >> $NDB_TOOLS_OUTPUT
+#Should only t11_c is restored
+SELECT * FROM t11_c ORDER BY c1;
+
 #
 # Cleanup
 #
 
 --disable_warnings
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
-drop table if exists t2_c;
+drop table if exists t2_c,t11_c,t12_c;
 --enable_warnings
 
 #

=== modified file 'storage/ndb/src/common/logger/Logger.cpp'
--- a/storage/ndb/src/common/logger/Logger.cpp	2006-12-23 19:20:40 +0000
+++ b/storage/ndb/src/common/logger/Logger.cpp	2008-07-25 16:10:36 +0000
@@ -222,6 +222,7 @@ Logger::addHandler(const BaseString &log
       *err= handler->getErrorCode();
       if(handler->getErrorStr())
         strncpy(errStr, handler->getErrorStr(), len);
+      delete handler;
       DBUG_RETURN(false);
     }
     loghandlers.push_back(handler);

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-05-30 06:35:19 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-07-23 11:25:03 +0000
@@ -8964,7 +8964,7 @@ Dblqh::copy_bounds(Uint32 * dst, TcConne
     
     if(len < left)
     {
-      offset = len;
+      offset = tcPtrP->m_offset_current_keybuf + len;
     }
     else
     {

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-04-22 20:09:38 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-07-29 09:41:01 +0000
@@ -908,12 +908,14 @@ int MgmtSrvr::sendStopMgmd(NodeId nodeId
     if(ndb_mgm_connect(h,1,0,0))
     {
       DBUG_PRINT("info",("failed ndb_mgm_connect"));
+      ndb_mgm_destroy_handle(&h);
       return SEND_OR_RECEIVE_FAILED;
     }
     if(!restart)
     {
       if(ndb_mgm_stop(h, 1, (const int*)&nodeId) < 0)
       {
+        ndb_mgm_destroy_handle(&h);
         return SEND_OR_RECEIVE_FAILED;
       }
     }
@@ -923,6 +925,7 @@ int MgmtSrvr::sendStopMgmd(NodeId nodeId
       nodes[0]= (int)nodeId;
       if(ndb_mgm_restart2(h, 1, nodes, initialStart, nostart, abort) < 0)
       {
+        ndb_mgm_destroy_handle(&h);
         return SEND_OR_RECEIVE_FAILED;
       }
     }

=== modified file 'storage/ndb/test/ndbapi/testOIBasic.cpp'
--- a/storage/ndb/test/ndbapi/testOIBasic.cpp	2008-04-10 16:54:09 +0000
+++ b/storage/ndb/test/ndbapi/testOIBasic.cpp	2008-07-23 11:25:03 +0000
@@ -614,6 +614,10 @@ getcs(Par par)
       uint n = urandom(maxcsnumber);
       cs = get_charset(n, MYF(0));
       if (cs != 0) {
+        // avoid dodgy internal character sets
+        // see bug# 37554
+        if (cs->state & MY_CS_HIDDEN)
+          continue;
         // prefer complex charsets
         if (cs->mbmaxlen != 1 || urandom(5) == 0)
           break;

=== modified file 'storage/ndb/tools/restore/restore_main.cpp'
--- a/storage/ndb/tools/restore/restore_main.cpp	2008-06-18 21:19:57 +0000
+++ b/storage/ndb/tools/restore/restore_main.cpp	2008-07-24 10:57:58 +0000
@@ -929,7 +929,8 @@ main(int argc, char** argv)
       {
         for(i=0; i < metaData.getNoOfTables(); i++)
         {
-          if (checkSysTable(metaData, i))
+          if (checkSysTable(metaData, i) && 
+             checkDbAndTableName(metaData[i]))
           {
             for(Uint32 j= 0; j < g_consumers.size(); j++)
               if (!g_consumers[j]->table_equal(* metaData[i]))
@@ -945,7 +946,8 @@ main(int argc, char** argv)
       { 
       //if want to promote attributes, compability check is done firstly
         for (i=0; i < metaData.getNoOfTables(); i++){
-          if (checkSysTable(metaData, i))
+          if (checkSysTable(metaData, i) &&
+             checkDbAndTableName(metaData[i]))
           {
             for(Uint32 j= 0; j < g_consumers.size(); j++)
             {

Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:2642) jonas oreland3 Aug