List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:September 24 2009 11:22am
Subject:bzr commit into mysql-5.1-telco-6.3 branch (aelkin:3051) Bug#47037
View as plain text  
#At file:///home/andrei/MySQL/BZR/MERGE/mysql-5.1-telco-6.3/ based on revid:aelkin@stripped

 3051 Andrei Elkin	2009-09-24 [merge]
      merging from the repository to local 6.3 with fixes for bug#47037

    added:
      mysql-test/suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc
      storage/ndb/include/kernel/signaldata/LocalRouteOrd.hpp
      storage/ndb/src/common/debugger/signaldata/LocalRouteOrd.cpp
      storage/ndb/test/run-test/conf-ndb07.cnf
    renamed:
      mysql-test/extra/rpl_tests/rpl_ndb_multi_binlog_update.cnf => mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.cnf
      mysql-test/extra/rpl_tests/rpl_ndb_multi_binlog_update.test => mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc
    modified:
      mysql-test/include/restart_mysqld.inc
      mysql-test/suite/ndb/r/ndb_alter_table_online.result
      mysql-test/suite/ndb/r/ndb_multi.result
      mysql-test/suite/ndb/t/ndb_alter_table_online.test
      mysql-test/suite/ndb/t/ndb_multi.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_slave_lsu.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.cnf
      mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.test
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_binlog.h
      storage/ndb/include/kernel/GlobalSignalNumbers.h
      storage/ndb/include/kernel/signaldata/SignalData.hpp
      storage/ndb/src/common/debugger/signaldata/Makefile.am
      storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp
      storage/ndb/src/common/debugger/signaldata/SignalNames.cpp
      storage/ndb/src/kernel/blocks/ERROR_codes.txt
      storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
      storage/ndb/src/kernel/vm/SimulatedBlock.cpp
      storage/ndb/src/kernel/vm/SimulatedBlock.hpp
      storage/ndb/src/ndbapi/Ndb.cpp
      storage/ndb/test/ndbapi/testDict.cpp
      storage/ndb/test/ndbapi/testNdbApi.cpp
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/ndbapi/testSystemRestart.cpp
      storage/ndb/test/run-test/Makefile.am
      storage/ndb/test/run-test/autotest-run.sh
      storage/ndb/test/run-test/daily-basic-tests.txt
      storage/ndb/test/src/UtilTransactions.cpp
=== modified file 'mysql-test/include/restart_mysqld.inc'
--- a/mysql-test/include/restart_mysqld.inc	2008-12-25 09:53:24 +0000
+++ b/mysql-test/include/restart_mysqld.inc	2009-09-21 11:15:35 +0000
@@ -1,7 +1,11 @@
+if (!`SELECT LENGTH("$mysqld_name")`)
+{
+  let $mysqld_name=mysqld.1;
+}
 
 # Write file to make mysql-test-run.pl expect the "crash", but don't start
 # it until it's told to
---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_file $MYSQLTEST_VARDIR/tmp/$mysqld_name.expect
 wait
 EOF
 
@@ -10,7 +14,7 @@ EOF
 shutdown_server 10;
 
 # Write file to make mysql-test-run.pl start up the server again
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--append_file $MYSQLTEST_VARDIR/tmp/$mysqld_name.expect
 restart
 EOF
 
@@ -22,4 +26,3 @@ EOF
 
 # Turn off reconnect again
 --disable_reconnect
-

=== modified file 'mysql-test/suite/ndb/r/ndb_alter_table_online.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2009-05-09 06:31:38 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2009-09-15 13:42:29 +0000
@@ -682,6 +682,30 @@ CREATE TABLE t1
 b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYNAMIC ENGINE=NDB;
 pk1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
 b Int NULL AT=FIXED ST=MEMORY
+DROP TABLE t1;
+********************
+* bug#44695 ALTER TABLE during START BACKUP crashes mysqld     
+********************
+CREATE TABLE t1(k INT NOT NULL PRIMARY KEY AUTO_INCREMENT) ROW_FORMAT=DYNAMIC ENGINE=NDB;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+16384
+ALTER ONLINE TABLE t1 ADD b INT;
 ********************
 * Cleanup Section
 ********************

=== modified file 'mysql-test/suite/ndb/r/ndb_multi.result'
--- a/mysql-test/suite/ndb/r/ndb_multi.result	2007-11-12 10:42:37 +0000
+++ b/mysql-test/suite/ndb/r/ndb_multi.result	2009-09-17 13:53:38 +0000
@@ -143,3 +143,39 @@ show tables like '%$%';
 Tables_in_test (%$%)
 show tables like '%$%';
 Tables_in_test (%$%)
+create table t1(s char(1)) engine = myisam;
+insert into t1 values ("a"),("b"),("c");
+create table t1(s char(1)) engine = ndb;
+insert into t1 values ("d"),("e"),("f");
+Restarting mysqld
+use test;
+select * from t1 order by s;
+s
+a
+b
+c
+select * from t1 order by s;
+s
+d
+e
+f
+drop table t1;
+select * from t1 order by s;
+s
+a
+b
+c
+create table t1(s char(1)) engine = ndb;
+insert into t1 values ("g"),("h"),("i");
+show tables;
+Tables_in_test
+t1
+Warnings:
+Warning	1050	Local table test.t1 shadows ndb table
+select * from t1 order by s;
+s
+a
+b
+c
+drop table t1;
+drop table t1;

=== modified file 'mysql-test/suite/ndb/t/ndb_alter_table_online.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2009-02-16 08:34:08 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2009-09-15 13:42:29 +0000
@@ -731,6 +731,39 @@ b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYN
 
 --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'AT='
 
+DROP TABLE t1;
+
+--echo ********************
+--echo * bug#44695 ALTER TABLE during START BACKUP crashes mysqld     
+--echo ********************
+# Testing failure of online alter during ongoing backup
+
+CREATE TABLE t1(k INT NOT NULL PRIMARY KEY AUTO_INCREMENT) ROW_FORMAT=DYNAMIC ENGINE=NDB;
+# create some data to slow down backup
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+INSERT INTO t1 SELECT NULL FROM t1;
+SELECT COUNT(*) FROM t1;
+--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup nowait" >> $NDB_TOOLS_OUTPUT
+--disable_warnings
+--error 0,762,1296
+ALTER ONLINE TABLE t1 ADD b INT;
+# waut for backup to complete
+--sleep 10
+
+--enable_warnings
 --echo ********************
 --echo * Cleanup Section
 --echo ********************

=== modified file 'mysql-test/suite/ndb/t/ndb_multi.test'
--- a/mysql-test/suite/ndb/t/ndb_multi.test	2008-09-08 14:34:10 +0000
+++ b/mysql-test/suite/ndb/t/ndb_multi.test	2009-09-21 13:53:09 +0000
@@ -155,3 +155,39 @@ show tables like '%$%';
 
 connection server1;
 show tables like '%$%';
+
+#
+# Bug #42614 Mysql auto locate databases can overwrite frm data.
+#
+connection server1;
+create table t1(s char(1)) engine = myisam;
+insert into t1 values ("a"),("b"),("c");
+connection server2;
+create table t1(s char(1)) engine = ndb;
+insert into t1 values ("d"),("e"),("f");
+connection server1;
+## Restart mysqld nodes
+--echo Restarting mysqld
+let $mysqld_name=mysqld.1.1;
+--source include/restart_mysqld.inc
+use test;
+select * from t1 order by s;
+connection server2;
+select * from t1 order by s;
+drop table t1;
+connection server1;
+select * from t1 order by s;
+connection server2;
+create table t1(s char(1)) engine = ndb;
+insert into t1 values ("g"),("h"),("i");
+connection server1;
+show tables;
+select * from t1 order by s;
+
+#
+# Clean-up
+#
+connection server1;
+drop table t1;
+connection server2;
+drop table t1;
\ No newline at end of file

=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_slave_lsu.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_slave_lsu.result	2009-09-14 12:45:19 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_slave_lsu.result	2009-09-16 16:04:14 +0000
@@ -1,10 +1,7 @@
 *** Configuring connections ***
-*** Configuring replication via Slave ***
 STOP SLAVE;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
+*** Waiting for each cluster to startup ***
+*** Configuring replication via Slave ***
 RESET SLAVE;
 CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=MASTER_PORT,MASTER_USER="root";;
 START SLAVE;
@@ -274,10 +271,6 @@ slave-master-bin.000001	#	Query	1	#	use 
 *** Configuring replication via Slave1 ***
 STOP SLAVE;
 STOP SLAVE;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
 RESET SLAVE;
 CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=MASTER_PORT,MASTER_USER="root";
 START SLAVE;
@@ -547,10 +540,6 @@ slave-master-bin.000001	#	Query	1	#	use 
 *** Configuring replication via Slave2 ***
 STOP SLAVE;
 STOP SLAVE;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
-RESET MASTER;
 RESET SLAVE;
 CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=MASTER_PORT,MASTER_USER="root";;
 START SLAVE;

=== renamed file 'mysql-test/extra/rpl_tests/rpl_ndb_multi_binlog_update.cnf' => 'mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.cnf'
=== renamed file 'mysql-test/extra/rpl_tests/rpl_ndb_multi_binlog_update.test' => 'mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc'
=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.cnf'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.cnf	2009-09-11 10:34:36 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.cnf	2009-09-16 16:04:14 +0000
@@ -1 +1 @@
-!include extra/rpl_tests/rpl_ndb_multi_binlog_update.cnf
+!include suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.cnf

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.test	2009-09-14 12:45:19 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_slave_lsu.test	2009-09-16 16:04:14 +0000
@@ -18,7 +18,7 @@
 #  - Second replicate via srv_slave1 and check all nodes' Binlog contents
 #  - Third replicate via srv_slave2 and check all nodes' Binlog contents
 #
-# Makes use of extra/rpl_tests/rpl_ndb_multi_binlog_update.test
+# Makes use of suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc
 # Originally motivated by bug#45756
 ###############################################################################
 
@@ -40,14 +40,50 @@ connect (srv_slave,127.0.0.1,root,,test,
 connect (srv_slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,);
 connect (srv_slave2,127.0.0.1,root,,test,$SLAVE_MYPORT2,);
 
---echo *** Configuring replication via Slave ***
 connection slave;
 --disable_warnings
 STOP SLAVE;
 source include/wait_for_slave_to_stop.inc;
 --enable_warnings
 
+--echo *** Waiting for each cluster to startup ***
+
+# Check schema op binlogging enabled between servers on cluster1
+--let $source_server=srv_master
+--let $dest_server=srv_master2
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_master1
+--let $dest_server=srv_master
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_master1
+--let $dest_server=srv_master2
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_master2
+--let $dest_server=srv_master
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+# Check schema op binlogging enabled between servers on cluster2
+--let $source_server=srv_slave
+--let $dest_server=srv_slave1
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_slave
+--let $dest_server=srv_slave2
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_slave1
+--let $dest_server=srv_slave2
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
+--let $source_server=srv_slave2
+--let $dest_server=srv_slave1
+source suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc;
+
 # Reset state of all Binlogging nodes
+--disable_query_log
 connection master;
 --disable_warnings
 RESET MASTER;
@@ -67,7 +103,9 @@ connection srv_slave2;
 --disable_warnings
 RESET MASTER;
 --enable_warnings
+--enable_query_log
 
+--echo *** Configuring replication via Slave ***
 connection slave;
 --disable_warnings
 RESET SLAVE;
@@ -78,7 +116,7 @@ source include/wait_for_slave_to_start.i
 --enable_warnings
 
 --let $which_slave=srv_slave
---source extra/rpl_tests/rpl_ndb_multi_binlog_update.test
+--source suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc
 
 
 
@@ -96,6 +134,7 @@ source include/wait_for_slave_to_stop.in
 --enable_warnings
 
 # Reset state of all Binlogging nodes
+--disable_query_log
 connection master;
 --disable_warnings
 RESET MASTER;
@@ -115,6 +154,7 @@ connection srv_slave2;
 --disable_warnings
 RESET MASTER;
 --enable_warnings
+--enable_query_log
 
 connection srv_slave1;
 --disable_warnings
@@ -126,7 +166,7 @@ source include/wait_for_slave_to_start.i
 --enable_warnings
 
 --let $which_slave=srv_slave1
---source extra/rpl_tests/rpl_ndb_multi_binlog_update.test
+--source suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc
 
 
 
@@ -144,6 +184,7 @@ source include/wait_for_slave_to_stop.in
 --enable_warnings
 
 # Reset state of all Binlogging nodes
+--disable_query_log
 connection master;
 --disable_warnings
 RESET MASTER;
@@ -163,6 +204,7 @@ connection srv_slave2;
 --disable_warnings
 RESET MASTER;
 --enable_warnings
+--enable_query_log
 
 connection srv_slave2;
 --disable_warnings
@@ -174,4 +216,4 @@ source include/wait_for_slave_to_start.i
 --enable_warnings
 
 --let $which_slave=srv_slave2
---source extra/rpl_tests/rpl_ndb_multi_binlog_update.test
+--source suite/rpl_ndb/t/rpl_ndb_multi_binlog_update.inc

=== added file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_wait_schema_logging.inc	2009-09-16 16:04:14 +0000
@@ -0,0 +1,78 @@
+# suite/t/rpl_ndb/rpl_ndb_wait_schema_logging.inc
+#
+# SUMMARY
+#   Waits until schema op performed on $source_server is
+#   being logged by $dest_server
+#   Assumes that source_server and dest_server are connected
+#   to the same cluster
+#   Assumes that $dest_server has binlogging enabled.
+#
+###############################################################
+# Include file to wait for schema logging setup, where schema
+# changes made on $source_server are logged on $dest_server
+###############################################################
+
+connection $dest_server;
+
+#--echo Waiting for schema event logging to be active between $source_server and $dest_server
+#--echo - First check that $dest_server has binary logging enabled
+
+let $binlog= query_get_value(show variables like 'log_bin', Value, 1);
+if (`SELECT "$binlog" != "ON"`)
+{
+  show variables like 'server_id';
+  show variables like 'log_bin';
+  --die ERROR: Binlogging not activated
+}
+
+--disable_query_log
+RESET MASTER;
+--enable_query_log
+
+# Following code 'inspired' by include/wait_for_binlog_event.inc
+
+--let $wait_binlog_event=drop table
+
+let $_loop_count= 10;
+let $_event= ;
+let $_event_pos= 1;
+
+while (`SELECT INSTR("$_event","$wait_binlog_event") = 0`)
+{
+  #--echo loop_count is $_loop_count;
+  dec $_loop_count;
+  if (!$_loop_count)
+  {
+    SHOW BINLOG EVENTS;
+    --die ERROR: failed while waiting local cluster schema event logging to start
+  }
+
+  connection $source_server;
+  --disable_query_log
+  create table rpl_ndb_wait_schema_logging (a int primary key) engine=ndb;
+  drop table rpl_ndb_wait_schema_logging;
+  --enable_query_log
+  connection $dest_server;
+
+  let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos);
+  #--echo Event is : $_event
+  while (`SELECT ("$_event" != "No such row") and (INSTR("$_event", "$wait_binlog_event") = 0)`)
+  {
+    inc $_event_pos;
+    let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos);
+    #--echo Event did not match- next event is $_event;
+  }
+}
+
+# Since we're attached to the same cluster, if we've seen the event
+# then synchronous binlogging of changes is on (i.e. synchronous with
+# the original schema change)
+# Therefore it should now be safe to reset the master on the destination
+# server as no more binlog changes are in-flight.
+connection $dest_server;
+
+--disable_query_log
+RESET MASTER;
+--enable_query_log
+
+#--echo - Schema event logging is active

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-09-24 11:05:08 +0000
+++ b/sql/ha_ndbcluster.cc	2009-09-24 11:22:26 +0000
@@ -530,14 +530,14 @@ void
 ha_ndbcluster::release_completed_operations(Thd_ndb *thd_ndb,
                                             NdbTransaction *trans)
 {
-  if (trans->hasBlobOperation())
-  {
-    /* We are reading/writing BLOB fields, 
-       releasing operation records is unsafe
-    */
-    return;
-  }
-
+  /**
+   * mysqld reads/write blobs fully,
+   *   which means that it does not keep blobs
+   *   open/active over execute, which means
+   *   that it should be safe to release anything completed here
+   *
+   *   i.e don't check for blobs, but just go ahead and release
+   */
   trans->releaseCompletedOperations();
 }
 
@@ -8491,7 +8491,17 @@ int ndbcluster_discover(handlerton *hton
       goto err;
     }
   }
-
+#ifdef HAVE_NDB_BINLOG
+  if (ndbcluster_check_if_local_table(db, name))
+  {
+    DBUG_PRINT("info", ("ndbcluster_discover: Skipping locally defined table '%s.%s'",
+                        db, name));
+    sql_print_error("ndbcluster_discover: Skipping locally defined table '%s.%s'",
+                    db, name);
+    error= 1;
+    goto err;
+  }
+#endif
   *frmlen= len;
   *frmblob= data;
   
@@ -12371,6 +12381,7 @@ int ha_ndbcluster::alter_frm(THD *thd, c
     my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
     my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));
     error= 1;
+    my_error(ER_FILE_NOT_FOUND, MYF(0), file); 
   }
   else
   {
@@ -12384,6 +12395,7 @@ int ha_ndbcluster::alter_frm(THD *thd, c
     {
       DBUG_PRINT("info", ("On-line alter of table %s failed", m_tabname));
       error= ndb_to_mysql_error(&dict->getNdbError());
+      my_error(error, MYF(0));
     }
     my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
     my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2009-09-11 11:03:19 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2009-09-21 13:53:09 +0000
@@ -149,12 +149,6 @@ static NDB_SCHEMA_OBJECT *ndb_get_schema
 static void ndb_free_schema_object(NDB_SCHEMA_OBJECT **ndb_schema_object,
                                    bool have_lock);
 
-/*
-  Helper functions
-*/
-static bool ndbcluster_check_if_local_table(const char *dbname, const char *tabname);
-static bool ndbcluster_check_if_local_tables_in_db(THD *thd, const char *dbname);
-
 #ifndef DBUG_OFF
 /* purecov: begin deadcode */
 static void print_records(TABLE *table, const uchar *record)
@@ -3930,7 +3924,7 @@ err:
 }
 #endif /* HAVE_NDB_BINLOG */
 
-static bool
+bool
 ndbcluster_check_if_local_table(const char *dbname, const char *tabname)
 {
   char key[FN_REFLEN + 1];
@@ -3952,7 +3946,7 @@ ndbcluster_check_if_local_table(const ch
   DBUG_RETURN(false);
 }
 
-static bool
+bool
 ndbcluster_check_if_local_tables_in_db(THD *thd, const char *dbname)
 {
   DBUG_ENTER("ndbcluster_check_if_local_tables_in_db");

=== modified file 'sql/ha_ndbcluster_binlog.h'
--- a/sql/ha_ndbcluster_binlog.h	2009-05-27 12:11:46 +0000
+++ b/sql/ha_ndbcluster_binlog.h	2009-09-21 13:53:09 +0000
@@ -300,6 +300,14 @@ inline void free_share(NDB_SHARE **share
 
 void set_binlog_flags(NDB_SHARE *share);
 
+/*
+  Helper functions
+*/
+bool
+ndbcluster_check_if_local_table(const char *dbname, const char *tabname);
+bool
+ndbcluster_check_if_local_tables_in_db(THD *thd, const char *dbname);
+
 inline
 Thd_ndb *
 get_thd_ndb(THD *thd)

=== modified file 'storage/ndb/include/kernel/GlobalSignalNumbers.h'
--- a/storage/ndb/include/kernel/GlobalSignalNumbers.h	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/include/kernel/GlobalSignalNumbers.h	2009-09-21 08:30:42 +0000
@@ -544,7 +544,7 @@ extern const GlobalSignalNumber NO_OF_SI
 /* 426 unused */
 /* 427 unused */
 /* 428 unused */
-/* 429 unused */
+#define GSN_LOCAL_ROUTE_ORD             429 /* local */
 /* 430 unused */
 #define GSN_TUPFRAGCONF                 431
 #define GSN_TUPFRAGREF                  432

=== added file 'storage/ndb/include/kernel/signaldata/LocalRouteOrd.hpp'
--- a/storage/ndb/include/kernel/signaldata/LocalRouteOrd.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/include/kernel/signaldata/LocalRouteOrd.hpp	2009-09-21 08:30:42 +0000
@@ -0,0 +1,34 @@
+/*
+   Copyright (C) 2003 MySQL AB
+    All rights reserved. Use is subject to license terms.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+
+#ifndef LOCAL_ROUTE_ORD_HPP
+#define LOCAL_ROUTE_ORD_HPP
+
+#include "SignalData.hpp"
+
+struct LocalRouteOrd
+{
+  STATIC_CONST( StaticLen = 3 );
+
+  Uint32 cnt; // 16-bit path, 16-bit destination
+  Uint32 gsn; // Final gsn
+  Uint32 prio;// Final prio
+  Uint32 path[1];
+};
+
+#endif

=== modified file 'storage/ndb/include/kernel/signaldata/SignalData.hpp'
--- a/storage/ndb/include/kernel/signaldata/SignalData.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/include/kernel/signaldata/SignalData.hpp	2009-09-21 08:30:42 +0000
@@ -226,4 +226,6 @@ GSN_PRINT_SIGNATURE(printCONTINUEB_NDBFS
 GSN_PRINT_SIGNATURE(printCONTINUEB_DBDIH);
 GSN_PRINT_SIGNATURE(printSTART_FRAG_REQ);
 
+GSN_PRINT_SIGNATURE(printLOCAL_ROUTE_ORD);
+
 #endif

=== added file 'storage/ndb/src/common/debugger/signaldata/LocalRouteOrd.cpp'
--- a/storage/ndb/src/common/debugger/signaldata/LocalRouteOrd.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/LocalRouteOrd.cpp	2009-09-21 08:30:42 +0000
@@ -0,0 +1,63 @@
+/*
+   Copyright (C) 2003 MySQL AB
+    All rights reserved. Use is subject to license terms.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+
+#include <signaldata/LocalRouteOrd.hpp>
+#include <DebuggerNames.hpp>
+#include <RefConvert.hpp>
+
+bool
+printLOCAL_ROUTE_ORD(FILE* output,
+                     const Uint32* theData, Uint32 len,
+                     Uint16 rbn)
+{
+  const LocalRouteOrd * sig = (const LocalRouteOrd*)theData;
+  Uint32 pathcnt = sig->cnt >> 16;
+  Uint32 dstcnt = sig->cnt & 0xFFFF;
+
+  fprintf(output, " pathcnt: %u dstcnt: %u\n", pathcnt, dstcnt);
+  fprintf(output, " gsn: %u(%s) prio: %u\n",
+          sig->gsn, getSignalName(sig->gsn), sig->prio);
+
+  const Uint32 * ptr = sig->path;
+  fprintf(output, " path:");
+  for (Uint32 i = 0; i<pathcnt; i++)
+  {
+    fprintf(output, " [ hop: 0x%x(%s) prio: %u ]",
+            ptr[0], getBlockName(refToMain(ptr[0])), ptr[1]);
+    ptr += 2;
+  }
+
+  fprintf(output, "\n dst:");
+  for (Uint32 i = 0; i<dstcnt; i++)
+  {
+    fprintf(output, " [ 0x%x(%s) ]",
+            ptr[0], getBlockName(refToMain(ptr[0])));
+  }
+  fprintf(output, "\n");
+
+  if (ptr < (theData + len))
+  {
+    fprintf(output, " data:");
+    while (ptr < (theData + len))
+    {
+      fprintf(output, " %.8x", * ptr++);
+    }
+    fprintf(output, "\n");
+  }
+  return true;
+}

=== modified file 'storage/ndb/src/common/debugger/signaldata/Makefile.am'
--- a/storage/ndb/src/common/debugger/signaldata/Makefile.am	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/Makefile.am	2009-09-21 08:30:42 +0000
@@ -39,7 +39,8 @@ libsignaldataprint_la_SOURCES = \
           SumaImpl.cpp NdbSttor.cpp CreateFragmentation.cpp \
 	  UtilLock.cpp TuxMaint.cpp AccLock.cpp \
           LqhTrans.cpp ReadNodesConf.cpp CntrStart.cpp \
-          ScanFrag.cpp
+          ScanFrag.cpp \
+          LocalRouteOrd.cpp
 
 include $(top_srcdir)/storage/ndb/config/common.mk.am
 include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am

=== modified file 'storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp'
--- a/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp	2009-09-21 08:30:42 +0000
@@ -201,6 +201,8 @@ SignalDataPrintFunctions[] = {
   ,{ GSN_LQH_TRANSCONF, printLQH_TRANSCONF }
   ,{ GSN_SCAN_FRAGREQ, printSCAN_FRAGREQ }
   ,{ GSN_START_FRAGREQ, printSTART_FRAG_REQ }
+
+  ,{ GSN_LOCAL_ROUTE_ORD, printLOCAL_ROUTE_ORD }
   ,{ 0, 0 }
 };
 

=== modified file 'storage/ndb/src/common/debugger/signaldata/SignalNames.cpp'
--- a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2009-09-21 08:30:42 +0000
@@ -655,5 +655,7 @@ const GsnName SignalNames [] = {
   ,{ GSN_START_TOREF, "START_TOREF" }
   ,{ GSN_END_TOREF, "END_TOREF" }
   ,{ GSN_START_PERMREP, "START_PERMREP" }
+
+  ,{ GSN_LOCAL_ROUTE_ORD, "LOCAL_ROUTE_ORD" }
 };
 const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName);

=== modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt'
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2009-09-14 12:51:36 +0000
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2009-09-15 12:02:04 +0000
@@ -5,7 +5,7 @@ Next DBACC 3002
 Next DBTUP 4029
 Next DBLQH 5054
 Next DBDICT 6008
-Next DBDIH 7220
+Next DBDIH 7221
 Next DBTC 8081
 Next CMVMI 9000
 Next BACKUP 10041

=== modified file 'storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2009-08-07 11:54:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2009-09-22 13:04:32 +0000
@@ -1388,7 +1388,6 @@ checkop:
     nextbits &= ~(Uint32)Operationrec::OP_MASK;
     nextbits &= ~(Uint32)Operationrec::OP_ELEMENT_DISAPPEARED;
     nextbits |= (nextop = ZINSERT);
-    nextbits |= Operationrec::OP_INSERT_IS_DONE;
     goto conf;
   }
   else if (nextop == ZINSERT)

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2009-08-18 13:09:00 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2009-09-15 12:02:04 +0000
@@ -15008,7 +15008,7 @@ void Dbdih::setNodeRestartInfoBits(Signa
   }//for
 
 #ifdef ERROR_INSERT
-  if (!tmp.isclear())
+  if (ERROR_INSERTED(7220) && !tmp.isclear())
   {
     jam();
 

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2009-09-11 07:38:50 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2009-09-22 07:39:17 +0000
@@ -2978,6 +2978,8 @@ public:
 #ifdef ERROR_INSERT
   void TRACE_OP_DUMP(const TcConnectionrec* regTcPtr, const char * pos);
 #endif
+
+  Uint32 get_node_status(Uint32 nodeId) const;
 };
 
 inline

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-09-11 07:38:50 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2009-09-22 07:39:17 +0000
@@ -3611,15 +3611,10 @@ void Dblqh::execLQHKEYREQ(Signal* signal
     return;
   }
 
+  if (unlikely(get_node_status(refToNode(sig5)) != ZNODE_UP))
   {
-    HostRecordPtr Thostptr;
-    Thostptr.i = refToNode(sig5); // TC-ref
-    ptrCheckGuard(Thostptr, chostFileSize, hostRecord);
-    if (unlikely(Thostptr.p->nodestatus != ZNODE_UP))
-    {
-      noFreeRecordLab(signal, lqhKeyReq, ZNODE_FAILURE_ERROR);
-      return;
-    }
+    noFreeRecordLab(signal, lqhKeyReq, ZNODE_FAILURE_ERROR);
+    return;
   }
   
   Uint32 senderVersion = getNodeInfo(refToNode(senderRef)).m_version;
@@ -5482,7 +5477,8 @@ void Dblqh::packLqhkeyreqLab(Signal* sig
   else
   {
     if (fragptr.p->m_copy_started_state != Fragrecord::AC_IGNORED)
-      ndbassert(LqhKeyReq::getOperation(Treqinfo) != ZINSERT);
+      ndbassert(LqhKeyReq::getOperation(Treqinfo) != ZINSERT ||
+                get_node_status(nextNodeId) != ZNODE_UP);
   }
   
   UintR TreadLenAiInd = (regTcPtr->readlenAi == 0 ? 0 : 1);
@@ -7929,9 +7925,23 @@ void Dblqh::lqhTransNextLab(Signal* sign
 	  default:
 	    ndbrequire(false);
 	  }
-        }//if
-      }//if
-    }//if
+        }
+      }
+      else
+      {
+#if defined VM_TRACE || defined ERROR_INSERT
+        jam();
+        ndbrequire(tcConnectptr.p->tcScanRec == RNIL);
+#endif
+      }
+    }
+    else
+    {
+#if defined VM_TRACE || defined ERROR_INSERT
+      jam();
+      ndbrequire(tcConnectptr.p->tcScanRec == RNIL);
+#endif
+    }
   }//for
   tcNodeFailptr.p->tcRecNow = tend + 1;
   signal->theData[0] = ZLQH_TRANS_NEXT;
@@ -10593,6 +10603,8 @@ void Dblqh::execCOPY_FRAGREQ(Signal* sig
   tcConnectptr.p->schemaVersion = scanptr.p->scanSchemaVersion;
   tcConnectptr.p->savePointId = gci;
   tcConnectptr.p->applRef = 0;
+  tcConnectptr.p->transactionState = TcConnectionrec::SCAN_STATE_USED;
+
   scanptr.p->scanState = ScanRecord::WAIT_ACC_COPY;
   AccScanReq * req = (AccScanReq*)&signal->theData[0];
   req->senderData = scanptr.i;
@@ -20534,3 +20546,12 @@ Dblqh::TRACE_OP_DUMP(const Dblqh::TcConn
   (* traceopout) << endl;
 }
 #endif
+
+Uint32
+Dblqh::get_node_status(Uint32 nodeId) const
+{
+  HostRecordPtr Thostptr;
+  Thostptr.i = nodeId;
+  ptrCheckGuard(Thostptr, chostFileSize, hostRecord);
+  return Thostptr.p->nodestatus;
+}

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2009-09-14 12:51:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2009-09-21 08:30:42 +0000
@@ -7533,11 +7533,25 @@ Dbtc::checkScanFragList(Signal* signal,
 void Dbtc::execTAKE_OVERTCCONF(Signal* signal) 
 {
   jamEntry();
+
+  if (!checkNodeFailSequence(signal))
+  {
+    jam();
+    return;
+  }
+
   tfailedNodeId = signal->theData[0];
   hostptr.i = tfailedNodeId;
   ptrCheckGuard(hostptr, chostFilesize, hostRecord);
 
-  if (signal->getSendersBlockRef() != reference())
+  Uint32 senderRef = signal->theData[1];
+  if (signal->getLength() < 2)
+  {
+    jam();
+    senderRef = 0; // currently only used to see if it's from self
+  }
+
+  if (senderRef != reference())
   {
     jam();
 
@@ -7854,7 +7868,8 @@ void Dbtc::completeTransAtTakeOverDoLast
     /*------------------------------------------------------------*/
     NodeReceiverGroup rg(DBTC, c_alive_nodes);
     signal->theData[0] = tcNodeFailptr.p->takeOverNode;
-    sendSignal(rg, GSN_TAKE_OVERTCCONF, signal, 1, JBB);
+    signal->theData[1] = reference();
+    sendSignal(rg, GSN_TAKE_OVERTCCONF, signal, 2, JBB);
     
     if (tcNodeFailptr.p->queueIndex > 0) {
       jam();

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-09-04 11:01:23 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-09-16 10:52:41 +0000
@@ -439,10 +439,8 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
     Uint32 noOfDynFix;
     Uint32 noOfDynamic;
     Uint32 tabDesOffset[7];
-    Uint32 desAllocSize;
     Uint32 tableDescriptor;
     Uint32 dynTabDesOffset[3];
-    Uint32 dynDesAllocSize;
     Uint32 dynTableDescriptor;
   };
   typedef Ptr<AlterTabOperation> AlterTabOperationPtr;
@@ -2866,6 +2864,8 @@ private:
   Uint32 getTabDescrOffsets(Uint32, Uint32, Uint32, Uint32*);
   Uint32 getDynTabDescrOffsets(Uint32 MaskSize, Uint32* offset);
   Uint32 allocTabDescr(Uint32 allocSize);
+  void releaseTabDescr(Uint32 desc);
+
   void freeTabDescr(Uint32 retRef, Uint32 retNo, bool normal = true);
   Uint32 getTabDescrWord(Uint32 index);
   void setTabDescrWord(Uint32 index, Uint32 word);

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2009-09-21 12:11:14 +0000
@@ -670,6 +670,7 @@ Dbtup::initTab(Tablerec* const regTabPtr
 
   regTabPtr->tabDescriptor = RNIL;
   regTabPtr->readKeyArray = RNIL;
+  regTabPtr->dynTabDescriptor = RNIL;
 
   regTabPtr->m_bits = 0;
 

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2009-09-04 10:35:16 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2009-09-21 12:11:14 +0000
@@ -703,6 +703,8 @@ Dbtup::handleAlterTabPrepare(Signal *sig
   regAlterTabOpPtr.p->newNoOfAttrs= newNoOfAttr;
   regAlterTabOpPtr.p->newNoOfCharsets= newNoOfCharsets;
   regAlterTabOpPtr.p->newNoOfKeyAttrs= newNoOfKeyAttrs;
+  regAlterTabOpPtr.p->tableDescriptor = RNIL;
+  regAlterTabOpPtr.p->dynTableDescriptor = RNIL;
 
   /* Allocate a new (possibly larger) table descriptor buffer. */
   Uint32 allocSize= getTabDescrOffsets(newNoOfAttr, newNoOfCharsets,
@@ -716,7 +718,6 @@ Dbtup::handleAlterTabPrepare(Signal *sig
     return;
   }
   regAlterTabOpPtr.p->tableDescriptor= tableDescriptorRef;
-  regAlterTabOpPtr.p->desAllocSize= allocSize;
 
   /*
     Get new pointers into tableDescriptor, and copy over old data.
@@ -814,15 +815,27 @@ Dbtup::handleAlterTabPrepare(Signal *sig
   /* Allocate the new (possibly larger) dynamic descriptor. */
   allocSize= getDynTabDescrOffsets((dyn_nullbits+31)>>5,
                                    regAlterTabOpPtr.p->dynTabDesOffset);
-  Uint32 dynTableDescriptorRef= allocTabDescr(allocSize);
+
+  Uint32 dynTableDescriptorRef = RNIL;
+  if (ERROR_INSERTED(4029))
+  {
+    jam();
+    dynTableDescriptorRef = RNIL;
+    terrorCode = ZMEM_NOTABDESCR_ERROR;
+    CLEAR_ERROR_INSERT_VALUE;
+  }
+  else
+  {
+    jam();
+    dynTableDescriptorRef = allocTabDescr(allocSize);
+  }
   if (dynTableDescriptorRef == RNIL) {
     jam();
-    freeTabDescr(tableDescriptorRef, regAlterTabOpPtr.p->desAllocSize);
+    releaseTabDescr(tableDescriptorRef);
     releaseAlterTabOpRec(regAlterTabOpPtr);
     sendAlterTabRef(signal, req, terrorCode);
     return;
   }
-  regAlterTabOpPtr.p->dynDesAllocSize= allocSize;
   regAlterTabOpPtr.p->dynTableDescriptor= dynTableDescriptorRef;
 
   sendAlterTabConf(signal, req, regAlterTabOpPtr.i);
@@ -917,10 +930,8 @@ Dbtup::handleAlterTableAbort(Signal *sig
                              AlterTabOperationPtr regAlterTabOpPtr,
                               Tablerec *regTabPtr)
 {
-  freeTabDescr(regAlterTabOpPtr.p->tableDescriptor,
-               regAlterTabOpPtr.p->desAllocSize);
-  freeTabDescr(regAlterTabOpPtr.p->dynTableDescriptor,
-               regAlterTabOpPtr.p->dynDesAllocSize);
+  releaseTabDescr(regAlterTabOpPtr.p->tableDescriptor);
+  releaseTabDescr(regAlterTabOpPtr.p->dynTableDescriptor);
   releaseAlterTabOpRec(regAlterTabOpPtr);
 
   sendAlterTabConf(signal, (AlterTabReq *)signal->getDataPtr());
@@ -1535,28 +1546,11 @@ void Dbtup::releaseTabDescr(Tablerec* co
 
     // move to start of descriptor
     descriptor -= offset[3];
-    Uint32 retNo= getTabDescrWord(descriptor + ZTD_DATASIZE);
-    ndbrequire(getTabDescrWord(descriptor + ZTD_HEADER) == ZTD_TYPE_NORMAL);
-    ndbrequire(retNo == getTabDescrWord((descriptor + retNo) - ZTD_TR_SIZE));
-    ndbrequire(ZTD_TYPE_NORMAL ==
-               getTabDescrWord((descriptor + retNo) - ZTD_TR_TYPE));
-    freeTabDescr(descriptor, retNo);
+    releaseTabDescr(descriptor);
   }
 
-  descriptor= regTabPtr->dynTabDescriptor;
-  if(descriptor != RNIL)
-  {
-    jam();
-    regTabPtr->dynTabDescriptor= RNIL;
-    regTabPtr->dynVarSizeMask= NULL;
-    regTabPtr->dynFixSizeMask= NULL;
-    Uint32 retNo= getTabDescrWord(descriptor + ZTD_DATASIZE);
-    ndbrequire(getTabDescrWord(descriptor + ZTD_HEADER) == ZTD_TYPE_NORMAL);
-    ndbrequire(retNo == getTabDescrWord((descriptor + retNo) - ZTD_TR_SIZE));
-    ndbrequire(ZTD_TYPE_NORMAL ==
-               getTabDescrWord((descriptor + retNo) - ZTD_TR_TYPE));
-    freeTabDescr(descriptor, retNo);
-  }
+  releaseTabDescr(regTabPtr->dynTabDescriptor);
+  regTabPtr->dynTabDescriptor = RNIL;
 }
 
 void Dbtup::releaseFragment(Signal* signal, Uint32 tableId, 

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp	2009-09-16 10:52:41 +0000
@@ -70,6 +70,20 @@ Dbtup::getDynTabDescrOffsets(Uint32 Mask
   return allocSize;
 }
 
+void
+Dbtup::releaseTabDescr(Uint32 descriptor)
+{
+  if (descriptor != RNIL)
+  {
+    Uint32 retNo= getTabDescrWord(descriptor + ZTD_DATASIZE);
+    ndbrequire(getTabDescrWord(descriptor + ZTD_HEADER) == ZTD_TYPE_NORMAL);
+    ndbrequire(retNo == getTabDescrWord((descriptor + retNo) - ZTD_TR_SIZE));
+    ndbrequire(ZTD_TYPE_NORMAL ==
+               getTabDescrWord((descriptor + retNo) - ZTD_TR_TYPE));
+    freeTabDescr(descriptor, retNo);
+  }
+}
+
 Uint32 Dbtup::allocTabDescr(Uint32 allocSize)
 {
   Uint32 reference = RNIL;

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2009-09-01 11:07:11 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2009-09-21 08:30:42 +0000
@@ -3801,7 +3801,7 @@ Qmgr::sendCommitFailReq(Signal* signal)
     ptrAss(nodePtr, nodeRec);
 
 #ifdef ERROR_INSERT    
-    if (ERROR_INSERTED(935) && nodePtr.i == c_error_insert_extra)
+    if (false && ERROR_INSERTED(935) && nodePtr.i == c_error_insert_extra)
     {
       ndbout_c("skipping node %d", c_error_insert_extra);
       CLEAR_ERROR_INSERT_VALUE;
@@ -3918,6 +3918,9 @@ void Qmgr::execCOMMIT_FAILREQ(Signal* si
 {
   NodeRecPtr nodePtr;
   jamEntry();
+
+  CRASH_INSERTION(935);
+
   BlockReference Tblockref = signal->theData[0];
   UintR TfailureNr = signal->theData[1];
   if (Tblockref != cpdistref) {

=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.cpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp	2009-09-21 08:30:42 +0000
@@ -34,6 +34,7 @@
 #include <signaldata/NodeStateSignalData.hpp>
 #include <signaldata/FsRef.hpp>
 #include <signaldata/SignalDroppedRep.hpp>
+#include <signaldata/LocalRouteOrd.hpp>
 #include <DebuggerNames.hpp>
 #include "LongSignal.hpp"
 
@@ -151,6 +152,7 @@ SimulatedBlock::installSimulatedBlockFun
   a[GSN_FSAPPENDREF]  = &SimulatedBlock::execFSAPPENDREF;
   a[GSN_NODE_START_REP] = &SimulatedBlock::execNODE_START_REP;
   a[GSN_API_START_REP] = &SimulatedBlock::execAPI_START_REP;
+  a[GSN_LOCAL_ROUTE_ORD] = &SimulatedBlock::execLOCAL_ROUTE_ORD;
 }
 
 void
@@ -2377,3 +2379,250 @@ SimulatedBlock::create_distr_key(Uint32 
 }
 
 CArray<KeyDescriptor> g_key_descriptor_pool;
+
+void
+SimulatedBlock::sendRoutedSignal(RoutePath path[], Uint32 pathcnt,
+                                 Uint32 dst[],
+                                 Uint32 dstcnt,
+                                 Uint32 gsn,
+                                 Signal * signal,
+                                 Uint32 sigLen,
+                                 JobBufferLevel prio,
+                                 SectionHandle * userhandle)
+{
+  ndbrequire(pathcnt > 0); // don't support (now) directly multi-cast
+  pathcnt--; // first hop is made from here
+
+
+  Uint32 len = LocalRouteOrd::StaticLen + (2 * pathcnt) + dstcnt;
+  ndbrequire(len <= 25);
+
+  SectionHandle handle(this, signal);
+  if (userhandle)
+  {
+    ljam();
+    handle.m_cnt = userhandle->m_cnt;
+    for (Uint32 i = 0; i<handle.m_cnt; i++)
+      handle.m_ptr[i] = userhandle->m_ptr[i];
+    userhandle->m_cnt = 0;
+  }
+
+  if (len + sigLen > 25)
+  {
+    ljam();
+
+    /**
+     * we need to store theData in a section
+     */
+    ndbrequire(handle.m_cnt < 3);
+    handle.m_ptr[2] = handle.m_ptr[1];
+    handle.m_ptr[1] = handle.m_ptr[0];
+    Ptr<SectionSegment> tmp;
+    ndbrequire(import(tmp, signal->theData, sigLen));
+    handle.m_ptr[0].p = tmp.p;
+    handle.m_ptr[0].i = tmp.i;
+    handle.m_ptr[0].sz = sigLen;
+    handle.m_cnt ++;
+  }
+  else
+  {
+    ljam();
+    memmove(signal->theData + len, signal->theData, 4 * sigLen);
+    len += sigLen;
+  }
+
+  LocalRouteOrd * ord = (LocalRouteOrd*)signal->getDataPtrSend();
+  ord->cnt = (pathcnt << 16) | (dstcnt);
+  ord->gsn = gsn;
+  ord->prio = Uint32(prio);
+
+  Uint32 * dstptr = ord->path;
+  for (Uint32 i = 1; i <= pathcnt; i++)
+  {
+    ndbrequire(refToNode(path[i].ref) == 0 ||
+               refToNode(path[i].ref) == getOwnNodeId());
+
+    * dstptr++ = path[i].ref;
+    * dstptr++ = Uint32(path[i].prio);
+  }
+
+  for (Uint32 i = 0; i<dstcnt; i++)
+  {
+    ndbrequire(refToNode(dst[i]) == 0 ||
+               refToNode(dst[i]) == getOwnNodeId());
+
+    * dstptr++ = dst[i];
+  }
+
+  sendSignal(path[0].ref, GSN_LOCAL_ROUTE_ORD, signal, len,
+             path[0].prio, &handle);
+}
+
+void
+SimulatedBlock::execLOCAL_ROUTE_ORD(Signal* signal)
+{
+  ljamEntry();
+
+  if (!assembleFragments(signal))
+  {
+    ljam();
+    return;
+  }
+
+  if (ERROR_INSERTED(1001))
+  {
+    /**
+     * This NDBCNTR error code 1001
+     */
+    ljam();
+    SectionHandle handle(this, signal);
+    sendSignalWithDelay(reference(), GSN_LOCAL_ROUTE_ORD, signal, 200, 
+                        signal->getLength(), &handle);
+    return;
+  }
+
+  LocalRouteOrd* ord = (LocalRouteOrd*)signal->getDataPtr();
+  Uint32 pathcnt = ord->cnt >> 16;
+  Uint32 dstcnt = ord->cnt & 0xFFFF;
+  Uint32 sigLen = signal->getLength();
+
+  if (pathcnt == 0)
+  {
+    /**
+     * Send to final destination(s);
+     */
+    ljam();
+    Uint32 gsn = ord->gsn;
+    Uint32 prio = ord->prio;
+    memcpy(signal->theData+25, ord->path, 4*dstcnt);
+    SectionHandle handle(this, signal);
+    if (sigLen > LocalRouteOrd::StaticLen + dstcnt)
+    {
+      ljam();
+      /**
+       * Data is at end of this...
+       */
+      memmove(signal->theData,
+              signal->theData + LocalRouteOrd::StaticLen + dstcnt,
+              4 * (sigLen - (LocalRouteOrd::StaticLen + dstcnt)));
+      sigLen = sigLen - (LocalRouteOrd::StaticLen + dstcnt);
+    }
+    else
+    {
+      ljam();
+      /**
+       * Put section 0 in signal->theData
+       */
+      sigLen = handle.m_ptr[0].sz;
+      ndbrequire(sigLen <= 25);
+      copy(signal->theData, handle.m_ptr[0]);
+      release(handle.m_ptr[0]);
+
+      for (Uint32 i = 0; i < handle.m_cnt - 1; i++)
+        handle.m_ptr[i] = handle.m_ptr[i+1];
+      handle.m_cnt--;
+    }
+
+    /*
+     * The extra if-statement is as sendSignalNoRelease will copy sections
+     *   which is not necessary is only sending to one destination
+     */
+    if (dstcnt > 1)
+    {
+      jam();
+      /** 6.3 has not yet impl. sendSignalNoRelease */
+#if NDB_VERRSION_D >= NDB_MAKE_VERSION(6,4,0)
+      for (Uint32 i = 0; i<dstcnt; i++)
+      {
+        ljam();
+        sendSignalNoRelease(signal->theData[25+i], gsn, signal, sigLen,
+                            JobBufferLevel(prio), &handle);
+      }
+      releaseSections(handle);
+#else
+      if (handle.m_cnt == 0)
+      {
+        ljam();
+        for (Uint32 i = 0; i<dstcnt; i++)
+        {
+          ljam();
+          sendSignal(signal->theData[25+i], gsn, signal, sigLen,
+                     JobBufferLevel(prio));
+        }
+      }
+      else
+      {
+        /**
+         * This path is (out of laziness?) not implemented in 6.3
+         */
+        ndbrequire(false);
+      }
+#endif
+    }
+    else
+    {
+      jam();
+      sendSignal(signal->theData[25+0], gsn, signal, sigLen,
+                 JobBufferLevel(prio), &handle);
+    }
+  }
+  else
+  {
+    /**
+     * Reroute
+     */
+    ljam();
+    SectionHandle handle(this, signal);
+    Uint32 ref = ord->path[0];
+    Uint32 prio = ord->path[1];
+    Uint32 len = sigLen - 2;
+    ord->cnt = ((pathcnt - 1) << 16) | dstcnt;
+    memmove(ord->path, ord->path+2, 4 * (len - LocalRouteOrd::StaticLen));
+    sendSignal(ref, GSN_LOCAL_ROUTE_ORD, signal, len,
+               JobBufferLevel(prio), &handle);
+  }
+}
+
+
+bool
+SimulatedBlock::checkNodeFailSequence(Signal* signal)
+{
+  Uint32 ref = signal->getSendersBlockRef();
+
+  /**
+   * Make sure that a signal being part of node-failure handling
+   *   from a remote node, does not get to us before we got the NODE_FAILREP
+   *   (this to avoid tricky state handling)
+   *
+   * To ensure this, we send the signal via QMGR (GSN_COMMIT_FAILREQ)
+   *   and NDBCNTR (which sends NODE_FAILREP)
+   *
+   * The extra time should be negilable
+   *
+   * Note, make an exception for signals sent by our self
+   *       as they are only sent as a consequence of NODE_FAILREP
+   */
+  if (ref == reference() ||
+      (refToNode(ref) == getOwnNodeId() &&
+       refToMain(ref) == NDBCNTR))
+  {
+    ljam();
+    return true;
+  }
+
+  RoutePath path[2];
+  path[0].ref = QMGR_REF;
+  path[0].prio = JBB;
+  path[1].ref = NDBCNTR_REF;
+  path[1].prio = JBB;
+
+  Uint32 dst[1];
+  dst[0] = reference();
+
+  SectionHandle handle(this, signal);
+  Uint32 gsn = signal->header.theVerId_signalNumber;
+  Uint32 len = signal->getLength();
+
+  sendRoutedSignal(path, 2, dst, 1, gsn, signal, len, JBB, &handle);
+  return false;
+}

=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2009-09-21 08:30:42 +0000
@@ -218,6 +218,33 @@ protected:
   void handle_lingering_sections_after_execute(Signal*) const;
   void handle_lingering_sections_after_execute(SectionHandle*) const;
 
+  /**
+   * Send routed signals (ONLY LOCALLY)
+   *
+   * NOTE: Only localhost is allowed!
+   */
+  struct RoutePath
+  {
+    Uint32 ref;
+    JobBufferLevel prio;
+  };
+  void sendRoutedSignal(RoutePath path[],
+                        Uint32 pathcnt,      // #hops
+                        Uint32 dst[],        // Final destination(s)
+                        Uint32 dstcnt,       // #final destination(s)
+                        Uint32 gsn,          // Final GSN
+                        Signal*,
+                        Uint32 len,
+                        JobBufferLevel prio, // Final prio
+                        SectionHandle * handle = 0);
+
+
+  /**
+   * Check that signal sent from remote node
+   *   is guaranteed to be correctly serialized wrt to NODE_FAILREP
+   */
+  bool checkNodeFailSequence(Signal*);
+
   /**********************************************************
    * Fragmented signals
    */
@@ -485,6 +512,8 @@ protected:  
   void execCONTINUE_FRAGMENTED(Signal* signal);
   void execAPI_START_REP(Signal* signal);
   void execNODE_START_REP(Signal* signal);
+
+  void execLOCAL_ROUTE_ORD(Signal*);
 private:
   /**
    * Node state

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2009-06-22 09:01:05 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2009-09-21 13:53:09 +0000
@@ -799,11 +799,22 @@ Ndb::closeTransaction(NdbTransaction* aC
     DBUG_VOID_RETURN;
   }
   
-  if (aConnection->theReleaseOnClose == false) {
+  /**
+   * NOTE: It's ok to call getNodeSequence() here wo/ having mutex,
+   */
+  Uint32 nodeId = aConnection->getConnectedNodeId();
+  TransporterFacade* tp = theImpl->m_transporter_facade;   
+  Uint32 seq = tp->getNodeSequence(nodeId);
+  if (aConnection->theNodeSequence != seq)
+  {
+    aConnection->theReleaseOnClose = true;
+  }
+  
+  if (aConnection->theReleaseOnClose == false) 
+  {
     /**
      * Put it back in idle list for that node
      */
-    Uint32 nodeId = aConnection->getConnectedNodeId();
     aConnection->theNext = theConnectionArray[nodeId];
     theConnectionArray[nodeId] = aConnection;
     DBUG_VOID_RETURN;
@@ -1431,7 +1442,7 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* 
     goto error_handler;
 
   // Start transaction with table id as hint
-  tConnection = this->startTransaction(table,
+  tConnection = this->startTransaction(m_sys_tab_0,
                                        (const char *) &aTableId,
                                        sizeof(Uint32));
   if (tConnection == NULL)

=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp	2009-08-21 10:55:49 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp	2009-09-16 10:52:41 +0000
@@ -1748,9 +1748,11 @@ int
 runTableAddAttrsDuring(NDBT_Context* ctx, NDBT_Step* step){
 
   int result = NDBT_OK;
+  int abortAlter = ctx->getProperty("AbortAlter", Uint32(0));
 
   int records = ctx->getNumRecords();
   const int loops = ctx->getNumLoops();
+  NdbRestarter res;
 
   ndbout << "|- " << ctx->getTab()->getName() << endl;  
 
@@ -1799,10 +1801,20 @@ runTableAddAttrsDuring(NDBT_Context* ctx
                              NdbDictionary::Column::StorageTypeMemory, true);
       newTable.addColumn(newcol1);
       //ToDo: check #loops, how many columns l
-      
-      CHECK2(dict->alterTable(*oldTable, newTable) == 0,
-	     "TableAddAttrsDuring failed");
-      
+
+      if (abortAlter == 0)
+      {
+        CHECK2(dict->alterTable(*oldTable, newTable) == 0,
+               "TableAddAttrsDuring failed");
+      }
+      else
+      {
+        int nodeId = res.getNode(NdbRestarter::NS_RANDOM);
+        res.insertErrorInNode(nodeId, 4029);
+        CHECK2(dict->alterTable(*oldTable, newTable) != 0,
+               "TableAddAttrsDuring failed");
+      }
+
       dict->invalidateTable(myTab.getName());
       const NdbDictionary::Table * newTab = dict->getTable(myTab.getName());
       HugoTransactions hugoTrans(* newTab);
@@ -3758,6 +3770,16 @@ TESTCASE("TableAddAttrsDuring",
   STEP(runUseTableUntilStopped3);
   FINALIZER(runDropTheTable);
 }
+TESTCASE("TableAddAttrsDuringError",
+	 "Try to add attributes to the table when other thread is using it\n"
+	 "do this loop number of times\n"){
+  TC_PROPERTY("AbortAlter", 1);
+  INITIALIZER(runCreateTheTable);
+  STEP(runTableAddAttrsDuring);
+  STEP(runUseTableUntilStopped2);
+  STEP(runUseTableUntilStopped3);
+  FINALIZER(runDropTheTable);
+}
 TESTCASE("Bug21755",
          ""){
   INITIALIZER(runBug21755);

=== modified file 'storage/ndb/test/ndbapi/testNdbApi.cpp'
--- a/storage/ndb/test/ndbapi/testNdbApi.cpp	2009-09-07 11:00:31 +0000
+++ b/storage/ndb/test/ndbapi/testNdbApi.cpp	2009-09-22 13:04:32 +0000
@@ -2823,6 +2823,10 @@ runBug44065(NDBT_Context* ctx, NDBT_Step
   int rowno = 0;
   aValue = 0;
   Ndb* pNdb = GETNDB(step);
+  Ndb * pNdb2 = new Ndb(&ctx->m_cluster_connection, "TEST_DB");
+  pNdb2->init();
+  pNdb2->waitUntilReady();
+
   const NdbDictionary::Table* pTab= ctx->getTab();
   
   HugoOperations hugoOps1(*pTab);
@@ -2831,21 +2835,26 @@ runBug44065(NDBT_Context* ctx, NDBT_Step
   CHECK(hugoOps1.execute_NoCommit(pNdb) == 0);
 
   HugoOperations hugoOps2(*pTab);
-  CHECK(hugoOps2.startTransaction(pNdb) == 0);
+  CHECK(hugoOps2.startTransaction(pNdb2) == 0);
   
-  CHECK(hugoOps2.pkDeleteRecord(pNdb, rowno) == 0);
-  CHECK(hugoOps2.pkInsertRecord(pNdb, rowno) == 0);
+  CHECK(hugoOps2.pkDeleteRecord(pNdb2, rowno) == 0);
+  CHECK(hugoOps2.pkInsertRecord(pNdb2, rowno) == 0);
   
   NdbTransaction* trans = hugoOps2.getTransaction();
+  aValue = 0;
   
   trans->executeAsynch(NdbTransaction::NoCommit, a_callback, 0);
+  pNdb2->sendPreparedTransactions(1);
   CHECK(hugoOps1.execute_Commit(pNdb) == 0);
+  ndbout_c("waiting for callback");
   while (aValue == 0)
   {
+    pNdb2->pollNdb();
     NdbSleep_MilliSleep(100);
   }
-  CHECK(hugoOps2.execute_Rollback(pNdb) == 0);
+  CHECK(hugoOps2.execute_Rollback(pNdb2) == 0);
   
+  delete pNdb2;
   ctx->stopTest();
 
   return NDBT_OK;

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2009-09-14 12:51:36 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2009-09-21 09:12:10 +0000
@@ -312,7 +312,10 @@ int runRestarter(NDBT_Context* ctx, NDBT
     return NDBT_FAILED;
   }
   
-  loops *= (restarter.getNumDbNodes() > 4 ? 4 : restarter.getNumDbNodes());
+  loops *= (restarter.getNumDbNodes() > 2 ? 2 : restarter.getNumDbNodes());
+  if (loops < restarter.getNumDbNodes())
+    loops = restarter.getNumDbNodes();
+
   while(i<loops && result != NDBT_FAILED && !ctx->isTestStopped()){
 
     int id = lastId % restarter.getNumDbNodes();

=== modified file 'storage/ndb/test/ndbapi/testSystemRestart.cpp'
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp	2009-09-07 06:55:30 +0000
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp	2009-09-15 12:02:04 +0000
@@ -2000,9 +2000,20 @@ loop:
     int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
     res.dumpStateAllNodes(val2, 2);
 
+    Bitmask<256/32> mask;
     for (Uint32 i = 0; i<(nodeCount / 2); i++)
     {
-      res.insertErrorInNode(nodes[(nodeCount / 2) - (i + 1)], 7218);
+      int node = nodes[(nodeCount / 2) - (i + 1)];
+      mask.set(node);
+      res.insertErrorInNode(node, 7218);
+    }
+    
+    for (Uint32 i = 0; i<nodeCount; i++)
+    {
+      int node = nodes[i];
+      if (mask.get(node))
+        continue;
+      res.insertErrorInNode(node, 7220);
     }
 
     int lcp = 7099;

=== modified file 'storage/ndb/test/run-test/Makefile.am'
--- a/storage/ndb/test/run-test/Makefile.am	2009-05-27 12:11:46 +0000
+++ b/storage/ndb/test/run-test/Makefile.am	2009-09-15 20:01:07 +0000
@@ -25,7 +25,8 @@ test_PROGRAMS = atrt
 test_DATA=daily-basic-tests.txt daily-devel-tests.txt 16node-tests.txt \
           conf-ndbmaster.cnf \
           conf-fimafeng08.cnf conf-dl145a.cnf test-tests.txt conf-test.cnf db.sql \
-          conf-upgrade.cnf upgrade-tests.txt
+          conf-upgrade.cnf upgrade-tests.txt \
+	  conf-ndb07.cnf
 
 test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
           atrt-clear-result.sh autotest-run.sh atrt-backtrace.sh

=== modified file 'storage/ndb/test/run-test/autotest-run.sh'
--- a/storage/ndb/test/run-test/autotest-run.sh	2008-12-12 14:14:52 +0000
+++ b/storage/ndb/test/run-test/autotest-run.sh	2009-09-21 07:24:31 +0000
@@ -281,6 +281,7 @@ echo "date=$DATE" > info.txt
 echo "suite=$RUN" >> info.txt
 echo "clone=$clone0" >> info.txt
 echo "arch=$target" >> info.txt
+echo "host=$HOST" >> info.txt
 find . | xargs chmod ugo+r
 
 cd ..

=== added file 'storage/ndb/test/run-test/conf-ndb07.cnf'
--- a/storage/ndb/test/run-test/conf-ndb07.cnf	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/run-test/conf-ndb07.cnf	2009-09-15 19:03:46 +0000
@@ -0,0 +1,40 @@
+[atrt]
+basedir = CHOOSE_dir
+baseport = 14000
+clusters = .4node
+fix-nodeid=1
+
+[ndb_mgmd]
+
+[mysqld]
+skip-innodb
+loose-skip-bdb
+skip-grant-tables
+socket=mysql.sock
+
+[client]
+protocol=tcp
+
+[cluster_config.4node]
+ndb_mgmd = CHOOSE_host1
+ndbd = CHOOSE_host2,CHOOSE_host3,CHOOSE_host4,CHOOSE_host5
+ndbapi= CHOOSE_host1,CHOOSE_host1,CHOOSE_host1
+mysqld = CHOOSE_host1,CHOOSE_host6
+
+NoOfReplicas = 2
+IndexMemory = 100M 
+DataMemory = 500M
+BackupMemory = 64M
+MaxNoOfConcurrentScans = 100
+MaxNoOfSavedMessages= 1000
+NoOfFragmentLogFiles = 8
+FragmentLogFileSize = 64M
+ODirect=1
+
+SharedGlobalMemory=256M
+DiskPageBufferMemory=256M
+FileSystemPath=/data0/autotest
+FileSystemPathDataFiles=/data1/autotest
+FileSystemPathUndoFiles=/data2/autotest
+InitialLogfileGroup=undo_buffer_size=64M;undofile01.dat:256M;undofile02.dat:256M
+InitialTablespace=datafile01.dat:256M;datafile02.dat:256M

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2009-09-15 10:07:34 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2009-09-22 14:26:26 +0000
@@ -793,6 +793,14 @@ cmd: testNdbApi
 args: -n NdbRecordRowLength
 
 max-time: 500
+cmd: testNdbApi
+args: -n Bug44065
+
+max-time: 500
+cmd: testNdbApi
+args: -n Bug44065_org
+
+max-time: 500
 cmd: testInterpreter
 args: T1 
 

=== modified file 'storage/ndb/test/src/UtilTransactions.cpp'
--- a/storage/ndb/test/src/UtilTransactions.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/src/UtilTransactions.cpp	2009-09-15 16:52:04 +0000
@@ -780,6 +780,9 @@ UtilTransactions::readRowFromTableAndInd
     if (pTrans1 == NULL) {
       const NdbError err = pNdb->getNdbError();
       
+      if (err.code == 4006)
+        goto close_all;
+
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
 	NdbSleep_MilliSleep(50);


Attachment: [text/bzr-bundle] bzr/aelkin@mysql.com-20090924112226-iiqvs62azifec42w.bundle
Thread
bzr commit into mysql-5.1-telco-6.3 branch (aelkin:3051) Bug#47037Andrei Elkin24 Sep