List:Commits« Previous MessageNext Message »
From:jonas Date:August 15 2006 7:39am
Subject:bk commit into 5.1 tree (jonas:1.2272)
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, 2006-08-15 09:39:26+02:00, jonas@stripped +4 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-work
  into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
  MERGE: 1.2256.1.5

  mysql-test/t/disabled.def@stripped, 2006-08-15 09:39:23+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.184.1.1

  sql/ha_ndbcluster.cc@stripped, 2006-08-15 09:39:23+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.346.1.1

  sql/ha_ndbcluster_binlog.cc@stripped, 2006-08-15 09:39:23+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.76.1.1

  storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2006-08-15 09:39:23+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.83.1.1

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/mysql-5.1-new/RESYNC

--- 1.347/sql/ha_ndbcluster.cc	2006-08-15 09:39:30 +02:00
+++ 1.348/sql/ha_ndbcluster.cc	2006-08-15 09:39:30 +02:00
@@ -5829,7 +5829,7 @@
     DBUG_RETURN(HA_ERR_NO_CONNECTION);  
   ndb->setDatabaseName(db);
   NDBDICT* dict= ndb->getDictionary();
-  build_table_filename(key, sizeof(key), db, name, "");
+  build_table_filename(key, sizeof(key), db, name, "", 0);
   NDB_SHARE *share= get_share(key, 0, false);
   if (share && get_ndb_share_state(share) == NSS_ALTERED)
   {
@@ -5972,7 +5972,7 @@
   // Drop any tables belonging to database
   char full_path[FN_REFLEN];
   char *tmp= full_path +
-    build_table_filename(full_path, sizeof(full_path), dbname, "", "");
+    build_table_filename(full_path, sizeof(full_path), dbname, "", "", 0);
 
   ndb->setDatabaseName(dbname);
   List_iterator_fast<char> it(drop_list);
@@ -6095,7 +6095,7 @@
     
       /* check if database exists */
       char *end= key +
-        build_table_filename(key, sizeof(key), elmt.database, "", "");
+        build_table_filename(key, sizeof(key), elmt.database, "", "", 0);
       if (my_access(key, F_OK))
       {
         /* no such database defined, skip table */
@@ -6238,7 +6238,7 @@
     }
     
     // File is not in NDB, check for .ndb file with this name
-    build_table_filename(name, sizeof(name), db, file_name, ha_ndb_ext);
+    build_table_filename(name, sizeof(name), db, file_name, ha_ndb_ext, 0);
     DBUG_PRINT("info", ("Check access for %s", name));
     if (my_access(name, F_OK))
     {
@@ -6263,7 +6263,7 @@
   /* setup logging to binlog for all discovered tables */
   {
     char *end, *end1= name +
-      build_table_filename(name, sizeof(name), db, "", "");
+      build_table_filename(name, sizeof(name), db, "", "", 0);
     for (i= 0; i < ok_tables.records; i++)
     {
       file_name= (char*)hash_element(&ok_tables, i);
@@ -6285,7 +6285,7 @@
     file_name= hash_element(&ndb_tables, i);
     if (!hash_search(&ok_tables, file_name, strlen(file_name)))
     {
-      build_table_filename(name, sizeof(name), db, file_name, reg_ext);
+      build_table_filename(name, sizeof(name), db, file_name, reg_ext, 0);
       if (my_access(name, F_OK))
       {
         DBUG_PRINT("info", ("%s must be discovered", file_name));
@@ -6836,7 +6836,7 @@
   NDB_SHARE *share;
   DBUG_ENTER("ndb_get_commitcount");
 
-  build_table_filename(name, sizeof(name), dbname, tabname, "");
+  build_table_filename(name, sizeof(name), dbname, tabname, "", 0);
   DBUG_PRINT("enter", ("name: %s", name));
   pthread_mutex_lock(&ndbcluster_mutex);
   if (!(share=(NDB_SHARE*) hash_search(&ndbcluster_open_tables,

--- 1.77/sql/ha_ndbcluster_binlog.cc	2006-08-15 09:39:30 +02:00
+++ 1.78/sql/ha_ndbcluster_binlog.cc	2006-08-15 09:39:30 +02:00
@@ -3859,13 +3859,38 @@
   close_thread_tables(thd);
   pthread_mutex_lock(&injector_mutex);
   /* don't mess with the injector_ndb anymore from other threads */
+  int ndb_obj_cnt= 1; // g_ndb
+  ndb_obj_cnt+= injector_ndb == 0 ? 0 : 1;
+  ndb_obj_cnt+= schema_ndb == 0 ? 0 : 1;
+  ndb_obj_cnt+= ndbcluster_util_inited ? 1 : 0;
   injector_thd= 0;
   injector_ndb= 0;
   schema_ndb= 0;
   pthread_mutex_unlock(&injector_mutex);
   thd->db= 0; // as not to try to free memory
-  sql_print_information("Stopping Cluster Binlog");
 
+  if (!ndb_extra_logging)
+    sql_print_information("Stopping Cluster Binlog");
+  else
+    sql_print_information("Stopping Cluster Binlog: %u(%u)", 
+			  g_ndb_cluster_connection->get_active_ndb_objects(), 
+			  ndb_obj_cnt);
+
+  /**
+   * Add extra wait loop to make user "user" ndb-object go away...
+   *   otherwise user thread can have ongoing SUB_DATA
+   */
+  int sleep_cnt= 0;
+  while (sleep_cnt < 300 && g_ndb_cluster_connection->get_active_ndb_objects() > ndb_obj_cnt)
+  {
+    my_sleep(10000); // 10ms
+    sleep_cnt++;
+  }
+  if (ndb_extra_logging)
+    sql_print_information("Stopping Cluster Binlog: waited %ums %u(%u)", 
+			  10*sleep_cnt, g_ndb_cluster_connection->get_active_ndb_objects(), 
+			  ndb_obj_cnt);
+  
   if (apply_status_share)
   {
     free_share(&apply_status_share);
Thread
bk commit into 5.1 tree (jonas:1.2272)jonas15 Aug