List:Commits« Previous MessageNext Message »
From:monty Date:February 26 2006 2:03pm
Subject:bk commit into 5.1 tree (monty:1.2182)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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
  1.2182 06/02/26 16:03:43 monty@stripped +4 -0
  Cleanups
  Don't run upgrade.test with embedded server as it requires mysqlcheck

  sql/ha_ndbcluster_binlog.cc
    1.25 06/02/26 16:03:40 monty@stripped +5 -5
    Free table_share properly in case of errors
    More debugging

  sql/ha_ndbcluster.cc
    1.274 06/02/26 16:03:40 monty@stripped +11 -5
    Code style cleanups
    more dbugging

  mysql-test/t/upgrade.test
    1.2 06/02/26 16:03:40 monty@stripped +24 -21
    Change database names to start with mysqltest
    Don't run test with embedded server as it requires mysqlcheck

  mysql-test/r/upgrade.result
    1.2 06/02/26 16:03:40 monty@stripped +31 -31
    Change database names to start with mysqltest

# 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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.1

--- 1.1/mysql-test/r/upgrade.result	2006-02-17 11:18:46 +02:00
+++ 1.2/mysql-test/r/upgrade.result	2006-02-26 16:03:40 +02:00
@@ -1,43 +1,43 @@
-drop database if exists `testdb1`;
-drop database if exists `testdb-1`;
-drop database if exists `#mysql50#testdb-1`;
-create database `testdb1`;
-create database `#mysql50#testdb-1`;
-create table `testdb1`.`t1` (a int);
-create table `testdb1`.`#mysql50#t-1` (a int);
-create table `#mysql50#testdb-1`.`t1` (a int);
-create table `#mysql50#testdb-1`.`#mysql50#t-1` (a int);
-show create database `testdb1`;
+drop database if exists `mysqltest1`;
+drop database if exists `mysqltest-1`;
+drop database if exists `#mysql50#mysqltest-1`;
+create database `mysqltest1`;
+create database `#mysql50#mysqltest-1`;
+create table `mysqltest1`.`t1` (a int);
+create table `mysqltest1`.`#mysql50#t-1` (a int);
+create table `#mysql50#mysqltest-1`.`t1` (a int);
+create table `#mysql50#mysqltest-1`.`#mysql50#t-1` (a int);
+show create database `mysqltest1`;
 Database	Create Database
-testdb1	CREATE DATABASE `testdb1` /*!40100 DEFAULT CHARACTER SET latin1 */
-show create database `testdb-1`;
-ERROR 42000: Unknown database 'testdb-1'
-show create database `#mysql50#testdb-1`;
+mysqltest1	CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
+show create database `mysqltest-1`;
+ERROR 42000: Unknown database 'mysqltest-1'
+show create database `#mysql50#mysqltest-1`;
 Database	Create Database
-#mysql50#testdb-1	CREATE DATABASE `#mysql50#testdb-1` /*!40100 DEFAULT CHARACTER SET latin1 */
-show tables in `testdb1`;
-Tables_in_testdb1
+#mysql50#mysqltest-1	CREATE DATABASE `#mysql50#mysqltest-1` /*!40100 DEFAULT CHARACTER SET latin1 */
+show tables in `mysqltest1`;
+Tables_in_mysqltest1
 #mysql50#t-1
 t1
-show tables in `#mysql50#testdb-1`;
-Tables_in_#mysql50#testdb-1
+show tables in `#mysql50#mysqltest-1`;
+Tables_in_#mysql50#mysqltest-1
 #mysql50#t-1
 t1
-show create database `testdb1`;
+show create database `mysqltest1`;
 Database	Create Database
-testdb1	CREATE DATABASE `testdb1` /*!40100 DEFAULT CHARACTER SET latin1 */
-show create database `testdb-1`;
+mysqltest1	CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
+show create database `mysqltest-1`;
 Database	Create Database
-testdb-1	CREATE DATABASE `testdb-1` /*!40100 DEFAULT CHARACTER SET latin1 */
-show create database `#mysql50#testdb-1`;
-ERROR 42000: Unknown database '#mysql50#testdb-1'
-show tables in `testdb1`;
-Tables_in_testdb1
+mysqltest-1	CREATE DATABASE `mysqltest-1` /*!40100 DEFAULT CHARACTER SET latin1 */
+show create database `#mysql50#mysqltest-1`;
+ERROR 42000: Unknown database '#mysql50#mysqltest-1'
+show tables in `mysqltest1`;
+Tables_in_mysqltest1
 t1
 t-1
-show tables in `testdb-1`;
-Tables_in_testdb-1
+show tables in `mysqltest-1`;
+Tables_in_mysqltest-1
 t1
 t-1
-drop database `testdb1`;
-drop database `testdb-1`;
+drop database `mysqltest1`;
+drop database `mysqltest-1`;

--- 1.1/mysql-test/t/upgrade.test	2006-02-17 11:18:45 +02:00
+++ 1.2/mysql-test/t/upgrade.test	2006-02-26 16:03:40 +02:00
@@ -1,28 +1,31 @@
+-- source include/not_embedded.inc
+
 --disable_warnings
-drop database if exists `testdb1`;
-drop database if exists `testdb-1`;
-drop database if exists `#mysql50#testdb-1`;
+drop database if exists `mysqltest1`;
+drop database if exists `mysqltest-1`;
+drop database if exists `#mysql50#mysqltest-1`;
 --enable_warnings
-create database `testdb1`;
-create database `#mysql50#testdb-1`;
-create table `testdb1`.`t1` (a int);
-create table `testdb1`.`#mysql50#t-1` (a int);
-create table `#mysql50#testdb-1`.`t1` (a int);
-create table `#mysql50#testdb-1`.`#mysql50#t-1` (a int);
-show create database `testdb1`;
+
+create database `mysqltest1`;
+create database `#mysql50#mysqltest-1`;
+create table `mysqltest1`.`t1` (a int);
+create table `mysqltest1`.`#mysql50#t-1` (a int);
+create table `#mysql50#mysqltest-1`.`t1` (a int);
+create table `#mysql50#mysqltest-1`.`#mysql50#t-1` (a int);
+show create database `mysqltest1`;
 --error 1049
-show create database `testdb-1`;
-show create database `#mysql50#testdb-1`;
-show tables in `testdb1`;
-show tables in `#mysql50#testdb-1`;
+show create database `mysqltest-1`;
+show create database `#mysql50#mysqltest-1`;
+show tables in `mysqltest1`;
+show tables in `#mysql50#mysqltest-1`;
 
 --exec $MYSQL_CHECK --all-databases --fix-db-names --fix-table-names
 
-show create database `testdb1`;
-show create database `testdb-1`;
+show create database `mysqltest1`;
+show create database `mysqltest-1`;
 --error 1049
-show create database `#mysql50#testdb-1`;
-show tables in `testdb1`;
-show tables in `testdb-1`;
-drop database `testdb1`;
-drop database `testdb-1`;
+show create database `#mysql50#mysqltest-1`;
+show tables in `mysqltest1`;
+show tables in `mysqltest-1`;
+drop database `mysqltest1`;
+drop database `mysqltest-1`;

--- 1.273/sql/ha_ndbcluster.cc	2006-02-22 10:10:47 +02:00
+++ 1.274/sql/ha_ndbcluster.cc	2006-02-26 16:03:40 +02:00
@@ -6700,6 +6700,7 @@
   return share;
 }
 
+
 /*
   Get a share object for key
 
@@ -6714,17 +6715,19 @@
 
   have_lock == TRUE, pthread_mutex_lock(&ndbcluster_mutex) already taken
 */
+
 NDB_SHARE *ndbcluster_get_share(const char *key, TABLE *table,
                                 bool create_if_not_exists,
                                 bool have_lock)
 {
-  DBUG_ENTER("get_share");
-  DBUG_PRINT("info", ("get_share: key %s", key));
   THD *thd= current_thd;
   NDB_SHARE *share;
+  uint length= (uint) strlen(key);
+  DBUG_ENTER("ndbcluster_get_share");
+  DBUG_PRINT("enter", ("key: '%s'", key));
+
   if (!have_lock)
     pthread_mutex_lock(&ndbcluster_mutex);
-  uint length= (uint) strlen(key);
   if (!(share= (NDB_SHARE*) hash_search(&ndbcluster_open_tables,
                                         (byte*) key,
                                         length)))
@@ -6784,10 +6787,10 @@
 
   dbug_print_open_tables();
 
-  DBUG_PRINT("get_share",
+  DBUG_PRINT("info",
              ("0x%lx key: %s  key_length: %d  key: %s",
               share, share->key, share->key_length, key));
-  DBUG_PRINT("get_share",
+  DBUG_PRINT("info",
              ("db.tablename: %s.%s  use_count: %d  commit_count: %d",
               share->db, share->table_name,
               share->use_count, share->commit_count));
@@ -6796,8 +6799,10 @@
   DBUG_RETURN(share);
 }
 
+
 void ndbcluster_real_free_share(NDB_SHARE **share)
 {
+  DBUG_ENTER("ndbcluster_real_free_share");
   DBUG_PRINT("real_free_share",
              ("0x%lx key: %s  key_length: %d",
               (*share), (*share)->key, (*share)->key_length));
@@ -6835,6 +6840,7 @@
   *share= 0;
 
   dbug_print_open_tables();
+  DBUG_VOID_RETURN;
 }
 
 /*

--- 1.24/sql/ha_ndbcluster_binlog.cc	2006-02-25 23:20:52 +02:00
+++ 1.25/sql/ha_ndbcluster_binlog.cc	2006-02-26 16:03:40 +02:00
@@ -245,10 +245,9 @@
     sql_print_error("Unable to get table share for %s, error=%d",
                     share->key, error);
     DBUG_PRINT("error", ("open_table_def failed %d", error));
+    free_table_share(table_share);
     my_free((gptr) table_share, MYF(0));
-    table_share= 0;
     my_free((gptr) table, MYF(0));
-    table= 0;
     DBUG_RETURN(error);
   }
   if ((error= open_table_from_share(thd, table_share, "", 0, 
@@ -257,10 +256,9 @@
     sql_print_error("Unable to open table for %s, error=%d(%d)",
                     share->key, error, my_errno);
     DBUG_PRINT("error", ("open_table_from_share failed %d", error));
+    free_table_share(table_share);
     my_free((gptr) table_share, MYF(0));
-    table_share= 0;
     my_free((gptr) table, MYF(0));
-    table= 0;
     DBUG_RETURN(error);
   }
   assign_new_table_id(table);
@@ -304,6 +302,7 @@
   THD *thd= current_thd;
   MEM_ROOT *mem_root= &share->mem_root;
   int do_event_op= ndb_binlog_running;
+  DBUG_ENTER("ndbcluster_binlog_init_share");
 
   share->op= 0;
   share->table= 0;
@@ -342,7 +341,7 @@
     {
       share->flags|= NSF_NO_BINLOG;
     }
-    return;
+    DBUG_VOID_RETURN;
   }
   while (1) 
   {
@@ -358,6 +357,7 @@
       share->flags|= NSF_BLOB_FLAG;
     break;
   }
+  DBUG_VOID_RETURN;
 }
 
 /*****************************************************************
Thread
bk commit into 5.1 tree (monty:1.2182)monty26 Feb