List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:June 22 2011 9:25am
Subject:bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4253 to 4257)
View as plain text  
 4257 magnus.blaudd@stripped	2011-06-22
      ndb
       - concatenate the ARG_CLASSPATH variable (which holds a list of strings)
         using platform specific separator before passing it to javac

    modified:
      storage/ndb/config/type_JAVA.cmake
 4256 magnus.blaudd@stripped	2011-06-22
      ndb
       - escape the echo command proerly to avoid executin parts of the
         echoed string

    modified:
      storage/ndb/config/type_JAVA.cmake
 4255 magnus.blaudd@stripped	2011-06-22 [merge]
      Merge 7.0 -> 7.1

    modified:
      sql/ha_ndb_index_stat.cc
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
      storage/ndb/tools/ndb_dump_frm_data.cpp
 4254 magnus.blaudd@stripped	2011-06-22 [merge]
      Merge 7.0 -> 7.1

    modified:
      storage/ndb/src/common/portlib/CMakeLists.txt
 4253 magnus.blaudd@stripped	2011-06-21 [merge]
      Merge 7.0 -> 7.1

    modified:
      mysql-test/t/ctype_cp932_binlog_stm.test
=== modified file 'sql/ha_ndb_index_stat.cc'
--- a/sql/ha_ndb_index_stat.cc	2011-06-16 11:36:45 +0000
+++ b/sql/ha_ndb_index_stat.cc	2011-06-22 07:37:51 +0000
@@ -70,7 +70,7 @@ struct Ndb_index_stat {
   int lt_old;     /* for info only */
   struct Ndb_index_stat *list_next;
   struct Ndb_index_stat *list_prev;
-  struct st_ndbcluster_share *share;
+  struct NDB_SHARE *share;
   Ndb_index_stat();
 };
 
@@ -1585,20 +1585,20 @@ ndb_index_stat_thread_func(void *arg __a
   /*
     wait for mysql server to start
   */
-  pthread_mutex_lock(&LOCK_server_started);
+  mysql_mutex_lock(&LOCK_server_started);
   while (!mysqld_server_started)
   {
     set_timespec(abstime, 1);
-    pthread_cond_timedwait(&COND_server_started, &LOCK_server_started,
-	                       &abstime);
+    mysql_cond_timedwait(&COND_server_started, &LOCK_server_started,
+	                 &abstime);
     if (ndbcluster_terminating)
     {
-      pthread_mutex_unlock(&LOCK_server_started);
+      mysql_mutex_unlock(&LOCK_server_started);
       pthread_mutex_lock(&LOCK_ndb_index_stat_thread);
       goto ndb_index_stat_thread_end;
     }
   }
-  pthread_mutex_unlock(&LOCK_server_started);
+  mysql_mutex_unlock(&LOCK_server_started);
 
   /*
     Wait for cluster to start
@@ -1650,10 +1650,8 @@ ndb_index_stat_thread_func(void *arg __a
       goto ndb_index_stat_thread_end;
     pthread_mutex_unlock(&LOCK_ndb_index_stat_thread);
 
-    pthread_mutex_lock(&LOCK_global_system_variables);
     /* const bool enable_ok_new= THDVAR(NULL, index_stat_enable); */
     const bool enable_ok_new= ndb_index_stat_get_enable(NULL);
-    pthread_mutex_unlock(&LOCK_global_system_variables);
 
     Ndb_index_stat_proc pr;
     pr.ndb= thd_ndb->ndb;

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-06-21 13:50:33 +0000
+++ b/sql/ha_ndbcluster.cc	2011-06-22 08:36:40 +0000
@@ -265,7 +265,10 @@ static MYSQL_THDVAR_UINT(
 */
 bool ndb_index_stat_get_enable(THD *thd)
 {
-  return THDVAR(thd, index_stat_enable);
+  mysql_mutex_lock(&LOCK_global_system_variables);
+  const bool value = THDVAR(thd, index_stat_enable);
+  mysql_mutex_unlock(&LOCK_global_system_variables);
+  return value;
 }
 
 /*
@@ -11049,7 +11052,7 @@ static int ndbcluster_init(void *p)
   if (pthread_create(&tmp2, &connection_attrib, ndb_index_stat_thread_func, 0))
   {
     DBUG_PRINT("error", ("Could not create ndb index statistics thread"));
-    hash_free(&ndbcluster_open_tables);
+    my_hash_free(&ndbcluster_open_tables);
     pthread_mutex_destroy(&ndbcluster_mutex);
     pthread_mutex_destroy(&LOCK_ndb_index_stat_thread);
     pthread_cond_destroy(&COND_ndb_index_stat_thread);
@@ -11070,7 +11073,7 @@ static int ndbcluster_init(void *p)
   if (!ndb_index_stat_thread_running)
   {
     DBUG_PRINT("error", ("ndb index statistics thread exited prematurely"));
-    hash_free(&ndbcluster_open_tables);
+    my_hash_free(&ndbcluster_open_tables);
     pthread_mutex_destroy(&ndbcluster_mutex);
     pthread_mutex_destroy(&LOCK_ndb_index_stat_thread);
     pthread_cond_destroy(&COND_ndb_index_stat_thread);

=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h	2011-06-17 07:14:20 +0000
+++ b/sql/ha_ndbcluster.h	2011-06-22 08:36:40 +0000
@@ -45,7 +45,6 @@ class NdbIndexScanOperation; 
 class NdbBlob;
 class NdbIndexStat;
 class NdbEventOperation;
-class NdbInterpretedCode;
 class ha_ndbcluster_cond;
 class Ndb_event_data;
 
@@ -171,7 +170,7 @@ typedef int (* prepare_detect_func) (str
                                      const uchar* old_data,
                                      const uchar* new_data,
                                      const MY_BITMAP* write_set,
-                                     NdbInterpretedCode* code);
+                                     class NdbInterpretedCode* code);
 
 struct st_conflict_fn_def
 {
@@ -191,7 +190,7 @@ enum enum_conflict_cause
 
 /* NdbOperation custom data which points out handler and record. */
 struct Ndb_exceptions_data {
-  struct st_ndbcluster_share *share;
+  struct NDB_SHARE* share;
   const NdbRecord* key_rec;
   const uchar* row;
   enum_conflicting_op_type op_type;
@@ -230,7 +229,7 @@ struct Ndb_statistics {
   Uint64 fragment_extent_free_space;
 };
 
-typedef struct st_ndbcluster_share {
+struct NDB_SHARE {
   NDB_SHARE_STATE state;
   MEM_ROOT mem_root;
   THR_LOCK lock;
@@ -257,7 +256,7 @@ typedef struct st_ndbcluster_share {
   char *old_names; // for rename table
   MY_BITMAP *subscriber_bitmap;
   NdbEventOperation *new_op;
-} NDB_SHARE;
+};
 
 inline
 NDB_SHARE_STATE
@@ -845,7 +844,7 @@ private:
                              key_range *max_key,
                              ha_rows *rows_out);
   int ndb_index_stat_set_rpk(uint inx);
-  int ndb_index_stat_wait(Ndb_index_stat *st,
+  int ndb_index_stat_wait(struct Ndb_index_stat *st,
                           uint sample_version);
   int ndb_index_stat_query(uint inx,
                            const key_range *min_key,

=== modified file 'storage/ndb/config/type_JAVA.cmake'
--- a/storage/ndb/config/type_JAVA.cmake	2011-02-02 09:52:33 +0000
+++ b/storage/ndb/config/type_JAVA.cmake	2011-06-22 09:23:35 +0000
@@ -68,7 +68,7 @@ MACRO(ADD_FILES_TO_JAR TARGET)
     SET(CLASS_DIRS -C ${DIR} ${IT})
 
     ADD_CUSTOM_COMMAND( TARGET  ${TARGET}.jar POST_BUILD
-      COMMAND echo "${JAVA_ARCHIVE} ufv ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${CLASS_DIRS}"
+      COMMAND echo \"${JAVA_ARCHIVE} ufv ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${CLASS_DIRS}\"
       COMMAND ${JAVA_ARCHIVE} ufv ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${CLASS_DIRS}
       COMMENT "adding ${CLASS_DIRS} to target ${TARGET}-${JAVA_NDB_VERSION}.jar")
 
@@ -88,7 +88,7 @@ MACRO(CREATE_JAR_FROM_CLASSES TARGET)
   SET_JAVA_NDB_VERSION()
 
   ADD_CUSTOM_TARGET( ${TARGET}.jar ALL
-      COMMAND echo "${JAVA_ARCHIVE} cfvm ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${ARG_MANIFEST}"
+      COMMAND echo \"${JAVA_ARCHIVE} cfvm ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${ARG_MANIFEST}\"
       COMMAND ${JAVA_ARCHIVE} cfvm ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar ${ARG_MANIFEST} )
   FOREACH(DEP ${ARG_DEPENDENCIES})
     ADD_DEPENDENCIES(${TARGET}.jar ${DEP})
@@ -122,22 +122,37 @@ MACRO(CREATE_JAR)
   SET_JAVA_NDB_VERSION()
 
   ADD_CUSTOM_TARGET( ${TARGET}.jar ALL
-    COMMAND echo "${JAVA_ARCHIVE} cfv ${JAR_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar -C ${CLASS_DIR} ."
+    COMMAND echo \"${JAVA_ARCHIVE} cfv ${JAR_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar -C ${CLASS_DIR} .\"
     COMMAND ${JAVA_ARCHIVE} cfv ${JAR_DIR}/${TARGET}-${JAVA_NDB_VERSION}.jar -C ${CLASS_DIR} .)
 
+  # Concatenate the ARG_CLASSSPATH(a list of strings) into a string
+  # with platform specific separator
+  SET(separator) # Empty separator to start with
+  SET(classpath_str)
+  FOREACH(item ${ARG_CLASSPATH})
+    SET(classpath_str ${classpath_str}${separator}${item})
+    IF (WIN32)
+      SET(separator ";")
+    ELSE()
+      SET(separator ":")
+    ENDIF()
+  ENDFOREACH()
+  # MESSAGE(STATUS "classpath_str: ${classpath_str}")
+
+
   IF(EXISTS ${ARG_ENHANCE})
     MESSAGE(STATUS "enhancing ${TARGET}.jar")
     SET(ENHANCER org.apache.openjpa.enhance.PCEnhancer)
     ADD_CUSTOM_COMMAND( TARGET ${TARGET}.jar PRE_BUILD
-      COMMAND echo "${JAVA_COMPILE} -d ${TARGET_DIR} -classpath ${ARG_CLASSPATH} ${JAVA_FILES}"
-      COMMAND ${JAVA_COMPILE} -d ${TARGET_DIR} -classpath "${ARG_CLASSPATH}" ${JAVA_FILES}
-      COMMAND echo "${JAVA_RUNTIME} -classpath ${ARG_CLASSPATH}:${WITH_CLASSPATH} ${ENHANCER} -p ${ARG_ENHANCE} -d ${TARGET_DIR}"
-      COMMAND ${JAVA_RUNTIME} -classpath "${ARG_CLASSPATH};${WITH_CLASSPATH}" ${ENHANCER} -p ${ARG_ENHANCE} -d ${TARGET_DIR}
+      COMMAND echo \"${JAVA_COMPILE} -d ${TARGET_DIR} -classpath ${classpath_str} ${JAVA_FILES}\"
+      COMMAND ${JAVA_COMPILE} -d ${TARGET_DIR} -classpath ${classpath_str} ${JAVA_FILES}
+      COMMAND echo \"${JAVA_RUNTIME} -classpath ${classpath_str}${separator}${WITH_CLASSPATH} ${ENHANCER} -p ${ARG_ENHANCE} -d ${TARGET_DIR}\"
+      COMMAND ${JAVA_RUNTIME} -classpath "${classpath_str}${separator}${WITH_CLASSPATH}" ${ENHANCER} -p ${ARG_ENHANCE} -d ${TARGET_DIR}
     )
   ELSE()
     ADD_CUSTOM_COMMAND( TARGET ${TARGET}.jar PRE_BUILD
-      COMMAND echo "${JAVA_COMPILE} -d ${TARGET_DIR} -classpath ${ARG_CLASSPATH} ${JAVA_FILES}"
-      COMMAND ${JAVA_COMPILE} -d ${TARGET_DIR} -classpath "${ARG_CLASSPATH}" ${JAVA_FILES}
+      COMMAND echo \"${JAVA_COMPILE} -d ${TARGET_DIR} -classpath ${classpath_str} ${JAVA_FILES}\"
+      COMMAND ${JAVA_COMPILE} -d ${TARGET_DIR} -classpath "${classpath_str}" ${JAVA_FILES}
     )
   ENDIF()
 

=== modified file 'storage/ndb/src/common/portlib/CMakeLists.txt'
--- a/storage/ndb/src/common/portlib/CMakeLists.txt	2011-05-25 06:52:33 +0000
+++ b/storage/ndb/src/common/portlib/CMakeLists.txt	2011-06-22 06:19:13 +0000
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/
 IF(WIN32)
   SET(EXTRA_SRC ${CMAKE_SOURCE_DIR}/sql/nt_servc.cc)
 ENDIF(WIN32)
-ADD_LIBRARY(ndbportlib STATIC
+ADD_CONVENIENCE_LIBRARY(ndbportlib
             NdbCondition.c NdbMutex.c ndb_socket.cpp
             NdbEnv.c NdbThread.c NdbHost.c NdbTCP.cpp
             NdbMem.c NdbConfig.c NdbTick.c NdbDir.cpp

=== modified file 'storage/ndb/tools/ndb_dump_frm_data.cpp'
--- a/storage/ndb/tools/ndb_dump_frm_data.cpp	2011-06-14 10:42:04 +0000
+++ b/storage/ndb/tools/ndb_dump_frm_data.cpp	2011-06-22 07:57:40 +0000
@@ -20,7 +20,6 @@
 #include <NdbApi.hpp>
 #include <NDBT.hpp>
 
-// UNUSED static int oi = 1000;
 static struct my_option
 my_long_options[] =
 {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4253 to 4257) magnus.blaudd22 Jun