List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:September 23 2011 2:20pm
Subject:bzr push into mysql-trunk branch (tor.didriksen:3449 to 3450)
View as plain text  
 3450 Tor Didriksen	2011-09-23
      Cleanup
      renamed:
        mysys/psi_noop.cc => mysys/psi_noop.c
      so that mysys is a C-only library
      (otherwise a bunch of C applications must be linked with C++)

    removed:
      mysys/my_new.cc
    renamed:
      mysys/psi_noop.cc => mysys/psi_noop.c
    modified:
      cmake/os/Windows.cmake
      configure.cmake
      extra/CMakeLists.txt
      mysys/CMakeLists.txt
      sql/mysqld.cc
      sql/sql_select.h
      sql/sql_table.h
      storage/heap/CMakeLists.txt
      storage/myisam/CMakeLists.txt
      unittest/gunit/gunit_test_main.cc
      unittest/mysys/CMakeLists.txt
      mysys/psi_noop.c
 3449 Tor Didriksen	2011-09-23
      Cleanup some min/max usage.
      Fix memory leak of all_early_options.

    modified:
      sql/handler.h
      sql/item_timefunc.h
      sql/mdl.h
      sql/mysqld.cc
      sql/opt_range.h
      sql/spatial.h
=== modified file 'cmake/os/Windows.cmake'
--- a/cmake/os/Windows.cmake	2011-09-21 12:46:39 +0000
+++ b/cmake/os/Windows.cmake	2011-09-23 14:20:16 +0000
@@ -72,6 +72,12 @@ IF(MSVC)
   ENDFOREACH()
   
   # Force static runtime libraries
+  # Choose C++ exception handling:
+  #   If /EH is not specified, the compiler will catch structured and
+  #   C++ exceptions, but will not destroy C++ objects that will go out of
+  #   scope as a result of the exception.
+  #   /EHsc catches C++ exceptions only and tells the compiler to assume that
+  #   extern C functions never throw a C++ exception.
   FOREACH(flag 
    CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO 
    CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT 
@@ -81,11 +87,6 @@ IF(MSVC)
    SET("${flag}" "${${flag}} /EHcs")
   ENDFOREACH()
   
-  # Remove support for exceptions
-  ## FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_INIT)
-  ##  STRING(REPLACE "/EHsc" ""   "${flag}" "${${flag}}") 
-  ## ENDFOREACH()
- 
   # Fix CMake's predefined huge stack size
   FOREACH(type EXE SHARED MODULE)
    STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}")

=== modified file 'configure.cmake'
--- a/configure.cmake	2011-09-14 07:49:49 +0000
+++ b/configure.cmake	2011-09-23 14:20:16 +0000
@@ -67,7 +67,7 @@ ENDIF()
 
 # The default C++ library for SunPro is really old, and not standards compliant.
 # http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html
-# Use sqlport rather than Rogue Wave.
+# Use stlport rather than Rogue Wave.
 IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
   IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
     SET(CMAKE_CXX_FLAGS 
@@ -76,7 +76,6 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
 ENDIF()
 
 IF(CMAKE_COMPILER_IS_GNUCXX)
-  # MySQL "canonical" GCC flags.
   IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static " 
      OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")
      SET(HAVE_DLOPEN FALSE CACHE "Disable dlopen due to -static flag" FORCE)

=== modified file 'extra/CMakeLists.txt'
--- a/extra/CMakeLists.txt	2011-09-01 10:41:37 +0000
+++ b/extra/CMakeLists.txt	2011-09-23 14:20:16 +0000
@@ -29,7 +29,6 @@ SET(MYSQL_INSTALL_COMPONENT Server)
 IF(NOT CMAKE_CROSSCOMPILING)
  ADD_EXECUTABLE(comp_err comp_err.c)
  TARGET_LINK_LIBRARIES(comp_err mysys)
- SET_TARGET_PROPERTIES(comp_err PROPERTIES LINKER_LANGUAGE CXX)
 ENDIF()
 
 ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h 
@@ -53,16 +52,13 @@ ADD_CUSTOM_TARGET(GenError
 
 MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
 TARGET_LINK_LIBRARIES(my_print_defaults  mysys)
-SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)
 
 MYSQL_ADD_EXECUTABLE(perror perror.c)
 ADD_DEPENDENCIES(perror GenError)
 TARGET_LINK_LIBRARIES(perror mysys)
-SET_TARGET_PROPERTIES(perror PROPERTIES LINKER_LANGUAGE CXX)
 
 MYSQL_ADD_EXECUTABLE(resolveip resolveip.c)
 TARGET_LINK_LIBRARIES(resolveip mysys)
-SET_TARGET_PROPERTIES(resolveip PROPERTIES LINKER_LANGUAGE CXX)
 
 IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
   INCLUDE(CheckFunctionExists)
@@ -74,7 +70,6 @@ ENDIF()
 
 MYSQL_ADD_EXECUTABLE(replace replace.c)
 TARGET_LINK_LIBRARIES(replace mysys)
-SET_TARGET_PROPERTIES(replace PROPERTIES LINKER_LANGUAGE CXX)
 
 IF(UNIX)
   IF(WITH_INNOBASE_STORAGE_ENGINE)
@@ -90,10 +85,8 @@ IF(UNIX)
 
   MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c)
   TARGET_LINK_LIBRARIES(resolve_stack_dump mysys)
-  SET_TARGET_PROPERTIES(resolve_stack_dump PROPERTIES LINKER_LANGUAGE CXX)
 
   MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c)
   TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
-  SET_TARGET_PROPERTIES(mysql_waitpid PROPERTIES LINKER_LANGUAGE CXX)
 ENDIF()
 

=== modified file 'mysys/CMakeLists.txt'
--- a/mysys/CMakeLists.txt	2011-09-01 10:41:37 +0000
+++ b/mysys/CMakeLists.txt	2011-09-23 14:20:16 +0000
@@ -35,7 +35,7 @@ SET(MYSYS_SOURCES  array.c charset-def.c
 				thr_rwlock.c tree.c typelib.c base64.c my_memmem.c my_getpagesize.c
 				lf_alloc-pin.c lf_dynarray.c lf_hash.c
 				my_atomic.c my_getncpus.c
-				my_rdtsc.c waiting_threads.c psi_noop.cc)
+				my_rdtsc.c waiting_threads.c psi_noop.c)
 
 IF (WIN32)
  SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_winthread.c my_wincond.c my_winerr.c my_winfile.c my_windac.c my_conio.c)
@@ -67,10 +67,8 @@ DTRACE_INSTRUMENT(mysys)
 ADD_EXECUTABLE(thr_lock thr_lock.c)
 TARGET_LINK_LIBRARIES(thr_lock mysys)
 SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
-SET_TARGET_PROPERTIES(thr_lock PROPERTIES LINKER_LANGUAGE CXX)
 
 ADD_EXECUTABLE(queues queues.c)
 TARGET_LINK_LIBRARIES(queues mysys)
 SET_TARGET_PROPERTIES(queues PROPERTIES COMPILE_FLAGS "-DMAIN")
-SET_TARGET_PROPERTIES(queues PROPERTIES LINKER_LANGUAGE CXX)
 ADD_TEST(queues_test queues)

=== removed file 'mysys/my_new.cc'
--- a/mysys/my_new.cc	2011-09-08 05:32:37 +0000
+++ b/mysys/my_new.cc	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
-
-   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 */
-
-/*
-  This is a replacement of new/delete operators to be used when compiling
-  with gcc 3.0.x to avoid including libstdc++
-*/
-
-#include "mysys_priv.h"
-

=== renamed file 'mysys/psi_noop.cc' => 'mysys/psi_noop.c'
--- a/mysys/psi_noop.cc	2011-08-25 07:53:21 +0000
+++ b/mysys/psi_noop.c	2011-09-23 14:20:16 +0000
@@ -25,213 +25,235 @@
 #include "my_sys.h"
 #include "mysql/psi/psi.h"
 
+typedef struct PSI_cond PSI_cond;
+typedef struct PSI_cond_locker PSI_cond_locker;
+typedef struct PSI_file PSI_file;
+typedef struct PSI_file_locker PSI_file_locker;
+typedef struct PSI_idle_locker PSI_idle_locker;
+typedef struct PSI_mutex PSI_mutex;
+typedef struct PSI_mutex_locker PSI_mutex_locker;
+typedef struct PSI_rwlock PSI_rwlock;
+typedef struct PSI_rwlock_locker PSI_rwlock_locker;
+typedef struct PSI_socket PSI_socket;
+typedef struct PSI_socket_locker PSI_socket_locker;
+typedef struct PSI_statement_locker PSI_statement_locker;
+typedef struct PSI_table PSI_table;
+typedef struct PSI_table_locker PSI_table_locker;
+typedef struct PSI_table_share PSI_table_share;
+typedef struct PSI_thread PSI_thread;
+
 C_MODE_START
 
-static void register_mutex_noop(const char *category,
-                                PSI_mutex_info *info,
-                                int count)
+#define NNN __attribute__((unused))
+
+static void register_mutex_noop(const char *category NNN,
+                                PSI_mutex_info *info NNN,
+                                int count NNN)
 {
   return;
 }
 
-static void register_rwlock_noop(const char *category,
-                                 PSI_rwlock_info *info,
-                                 int count)
+static void register_rwlock_noop(const char *category NNN,
+                                 PSI_rwlock_info *info NNN,
+                                 int count NNN)
 {
   return;
 }
 
-static void register_cond_noop(const char *category,
-                               PSI_cond_info *info,
-                               int count)
+static void register_cond_noop(const char *category NNN,
+                               PSI_cond_info *info NNN,
+                               int count NNN)
 {
   return;
 }
 
-static void register_thread_noop(const char *category,
-                                 PSI_thread_info *info,
-                                 int count)
+static void register_thread_noop(const char *category NNN,
+                                 PSI_thread_info *info NNN,
+                                 int count NNN)
 {
   return;
 }
 
-static void register_file_noop(const char *category,
-                               PSI_file_info *info,
-                               int count)
+static void register_file_noop(const char *category NNN,
+                               PSI_file_info *info NNN,
+                               int count NNN)
 {
   return;
 }
 
-static void register_stage_noop(const char *category,
-                                PSI_stage_info **info_array,
-                                int count)
+static void register_stage_noop(const char *category NNN,
+                                PSI_stage_info **info_array NNN,
+                                int count NNN)
 {
   return;
 }
 
-static void register_statement_noop(const char *category,
-                                    PSI_statement_info *info,
-                                    int count)
+static void register_statement_noop(const char *category NNN,
+                                    PSI_statement_info *info NNN,
+                                    int count NNN)
 {
   return;
 }
 
-static void register_socket_noop(const char *category,
-                                 PSI_socket_info *info,
-                                 int count)
+static void register_socket_noop(const char *category NNN,
+                                 PSI_socket_info *info NNN,
+                                 int count NNN)
 {
   return;
 }
 
 static PSI_mutex*
-init_mutex_noop(PSI_mutex_key key, const void *identity)
+init_mutex_noop(PSI_mutex_key key NNN, const void *identity NNN)
 {
   return NULL;
 }
 
-static void destroy_mutex_noop(PSI_mutex* mutex)
+static void destroy_mutex_noop(PSI_mutex* mutex NNN)
 {
   return;
 }
 
 static PSI_rwlock*
-init_rwlock_noop(PSI_rwlock_key key, const void *identity)
+init_rwlock_noop(PSI_rwlock_key key NNN, const void *identity NNN)
 {
   return NULL;
 }
 
-static void destroy_rwlock_noop(PSI_rwlock* rwlock)
+static void destroy_rwlock_noop(PSI_rwlock* rwlock NNN)
 {
   return;
 }
 
 static PSI_cond*
-init_cond_noop(PSI_cond_key key, const void *identity)
+init_cond_noop(PSI_cond_key key NNN, const void *identity NNN)
 {
   return NULL;
 }
 
-static void destroy_cond_noop(PSI_cond* cond)
+static void destroy_cond_noop(PSI_cond* cond NNN)
 {
   return;
 }
 
 static PSI_socket*
-init_socket_noop(PSI_socket_key key, const my_socket *fd)
+init_socket_noop(PSI_socket_key key NNN, const my_socket *fd NNN)
 {
   return NULL;
 }
 
-static void destroy_socket_noop(PSI_socket* socket)
+static void destroy_socket_noop(PSI_socket* socket NNN)
 {
   return;
 }
 
 static PSI_table_share*
-get_table_share_noop(my_bool temporary, TABLE_SHARE *share)
+get_table_share_noop(my_bool temporary NNN, struct TABLE_SHARE *share NNN)
 {
   return NULL;
 }
 
-static void release_table_share_noop(PSI_table_share* share)
+static void release_table_share_noop(PSI_table_share* share NNN)
 {
   return;
 }
 
 static void
-drop_table_share_noop(const char *schema_name, int schema_name_length,
-                      const char *table_name, int table_name_length)
+drop_table_share_noop(const char *schema_name NNN, int schema_name_length NNN,
+                      const char *table_name NNN, int table_name_length NNN)
 {
   return;
 }
 
 static PSI_table*
-open_table_noop(PSI_table_share *share, const void *identity)
+open_table_noop(PSI_table_share *share NNN, const void *identity NNN)
 {
   return NULL;
 }
 
-static void unbind_table_noop(PSI_table *table)
+static void unbind_table_noop(PSI_table *table NNN)
 {
   return;
 }
 
-static void rebind_table_noop(PSI_table *table)
+static void rebind_table_noop(PSI_table *table NNN)
 {
   return;
 }
 
-static void close_table_noop(PSI_table *table)
+static void close_table_noop(PSI_table *table NNN)
 {
   return;
 }
 
-static void create_file_noop(PSI_file_key key, const char *name, File file)
+static void create_file_noop(PSI_file_key key NNN,
+                             const char *name NNN, File file NNN)
 {
   return;
 }
 
-static int spawn_thread_noop(PSI_thread_key key,
-                             pthread_t *thread, const pthread_attr_t *attr,
-                             void *(*start_routine)(void*), void *arg)
+static int spawn_thread_noop(PSI_thread_key key NNN,
+                             pthread_t *thread NNN,
+                             const pthread_attr_t *attr NNN,
+                             void *(*start_routine)(void*) NNN, void *arg NNN)
 {
   return pthread_create(thread, attr, start_routine, arg);
 }
 
 static PSI_thread*
-new_thread_noop(PSI_thread_key key, const void *identity, ulong thread_id)
+new_thread_noop(PSI_thread_key key NNN,
+                const void *identity NNN, ulong thread_id NNN)
 {
   return NULL;
 }
 
-static void set_thread_id_noop(PSI_thread *thread, unsigned long id)
+static void set_thread_id_noop(PSI_thread *thread NNN, unsigned long id NNN)
 {
   return;
 }
 
 static PSI_thread*
-get_thread_noop(void)
+get_thread_noop(void NNN)
 {
   return NULL;
 }
 
-static void set_thread_user_noop(const char *user, int user_len)
+static void set_thread_user_noop(const char *user NNN, int user_len NNN)
 {
   return;
 }
 
-static void set_thread_user_host_noop(const char *user, int user_len,
-                                    const char *host, int host_len)
+static void set_thread_user_host_noop(const char *user NNN, int user_len NNN,
+                                      const char *host NNN, int host_len NNN)
 {
   return;
 }
 
-static void set_thread_db_noop(const char* db, int db_len)
+static void set_thread_db_noop(const char* db NNN, int db_len NNN)
 {
   return;
 }
 
-static void set_thread_command_noop(int command)
+static void set_thread_command_noop(int command NNN)
 {
   return;
 }
 
-static void set_thread_start_time_noop(time_t start_time)
+static void set_thread_start_time_noop(time_t start_time NNN)
 {
   return;
 }
 
-static void set_thread_state_noop(const char* state)
+static void set_thread_state_noop(const char* state NNN)
 {
   return;
 }
 
-static void set_thread_info_noop(const char* info, int info_len)
+static void set_thread_info_noop(const char* info NNN, int info_len NNN)
 {
   return;
 }
 
-static void set_thread_noop(PSI_thread* thread)
+static void set_thread_noop(PSI_thread* thread NNN)
 {
   return;
 }
@@ -241,210 +263,224 @@ static void delete_current_thread_noop(v
   return;
 }
 
-static void delete_thread_noop(PSI_thread *thread)
+static void delete_thread_noop(PSI_thread *thread NNN)
 {
   return;
 }
 
 static PSI_mutex_locker*
-get_thread_mutex_locker_noop(PSI_mutex_locker_state *state,
-                             PSI_mutex *mutex, PSI_mutex_operation op)
+get_thread_mutex_locker_noop(PSI_mutex_locker_state *state NNN,
+                             PSI_mutex *mutex NNN,
+                             enum PSI_mutex_operation op NNN)
 {
   return NULL;
 }
 
 static PSI_rwlock_locker*
-get_thread_rwlock_locker_noop(PSI_rwlock_locker_state *state,
-                              PSI_rwlock *rwlock, PSI_rwlock_operation op)
+get_thread_rwlock_locker_noop(PSI_rwlock_locker_state *state NNN,
+                              PSI_rwlock *rwlock NNN,
+                              enum PSI_rwlock_operation op NNN)
 {
   return NULL;
 }
 
 static PSI_cond_locker*
-get_thread_cond_locker_noop(PSI_cond_locker_state *state,
-                            PSI_cond *cond, PSI_mutex *mutex,
-                            PSI_cond_operation op)
+get_thread_cond_locker_noop(PSI_cond_locker_state *state NNN,
+                            PSI_cond *cond NNN, PSI_mutex *mutex NNN,
+                            enum PSI_cond_operation op NNN)
 {
   return NULL;
 }
 
 static PSI_table_locker*
-get_thread_table_io_locker_noop(PSI_table_locker_state *state,
-                                PSI_table *table, PSI_table_io_operation op, uint index)
+get_thread_table_io_locker_noop(PSI_table_locker_state *state NNN,
+                                PSI_table *table NNN,
+                                enum PSI_table_io_operation op NNN,
+                                uint index NNN)
 {
   return NULL;
 }
 
 static PSI_table_locker*
-get_thread_table_lock_locker_noop(PSI_table_locker_state *state,
-                                  PSI_table *table, PSI_table_lock_operation op, ulong op_flags)
+get_thread_table_lock_locker_noop(PSI_table_locker_state *state NNN,
+                                  PSI_table *table NNN,
+                                  enum PSI_table_lock_operation op NNN,
+                                  ulong op_flags NNN)
 {
   return NULL;
 }
 
 static PSI_file_locker*
-get_thread_file_name_locker_noop(PSI_file_locker_state *state,
-                                 PSI_file_key key,
-                                 PSI_file_operation op,
-                                 const char *name, const void *identity)
+get_thread_file_name_locker_noop(PSI_file_locker_state *state NNN,
+                                 PSI_file_key key NNN,
+                                 enum PSI_file_operation op NNN,
+                                 const char *name NNN, const void *identity NNN)
 {
   return NULL;
 }
 
 static PSI_file_locker*
-get_thread_file_stream_locker_noop(PSI_file_locker_state *state,
-                                   PSI_file *file, PSI_file_operation op)
+get_thread_file_stream_locker_noop(PSI_file_locker_state *state NNN,
+                                   PSI_file *file NNN,
+                                   enum PSI_file_operation op NNN)
 {
   return NULL;
 }
 
 
 static PSI_file_locker*
-get_thread_file_descriptor_locker_noop(PSI_file_locker_state *state,
-                                       File file, PSI_file_operation op)
+get_thread_file_descriptor_locker_noop(PSI_file_locker_state *state NNN,
+                                       File file NNN,
+                                       enum PSI_file_operation op NNN)
 {
   return NULL;
 }
 
 static PSI_socket_locker*
-get_thread_socket_locker_noop(PSI_socket_locker_state *state,
-                              PSI_socket *socket, PSI_socket_operation op)
+get_thread_socket_locker_noop(PSI_socket_locker_state *state NNN,
+                              PSI_socket *socket NNN,
+                              enum PSI_socket_operation op NNN)
 {
   return NULL;
 }
 
-static void unlock_mutex_noop(PSI_mutex *mutex)
+static void unlock_mutex_noop(PSI_mutex *mutex NNN)
 {
   return;
 }
 
-static void unlock_rwlock_noop(PSI_rwlock *rwlock)
+static void unlock_rwlock_noop(PSI_rwlock *rwlock NNN)
 {
   return;
 }
 
-static void signal_cond_noop(PSI_cond* cond)
+static void signal_cond_noop(PSI_cond* cond NNN)
 {
   return;
 }
 
-static void broadcast_cond_noop(PSI_cond* cond)
+static void broadcast_cond_noop(PSI_cond* cond NNN)
 {
   return;
 }
 
 static PSI_idle_locker*
-start_idle_wait_noop(PSI_idle_locker_state* state,
-                     const char *src_file, uint src_line)
+start_idle_wait_noop(PSI_idle_locker_state* state NNN,
+                     const char *src_file NNN, uint src_line NNN)
 {
   return NULL;
 }
 
-static void end_idle_wait_noop(PSI_idle_locker* locker)
+static void end_idle_wait_noop(PSI_idle_locker* locker NNN)
 {
   return;
 }
 
-static void start_mutex_wait_noop(PSI_mutex_locker* locker,
-                                  const char *src_file, uint src_line)
+static void start_mutex_wait_noop(PSI_mutex_locker* locker NNN,
+                                  const char *src_file NNN, uint src_line NNN)
 {
   return;
 }
 
-static void end_mutex_wait_noop(PSI_mutex_locker* locker, int rc)
+static void end_mutex_wait_noop(PSI_mutex_locker* locker NNN, int rc NNN)
 {
   return;
 }
 
 
-static void start_rwlock_rdwait_noop(PSI_rwlock_locker* locker,
-                                     const char *src_file, uint src_line)
+static void start_rwlock_rdwait_noop(PSI_rwlock_locker* locker NNN,
+                                     const char *src_file NNN,
+                                     uint src_line NNN)
 {
   return;
 }
 
-static void end_rwlock_rdwait_noop(PSI_rwlock_locker* locker, int rc)
+static void end_rwlock_rdwait_noop(PSI_rwlock_locker* locker NNN, int rc NNN)
 {
   return;
 }
 
-static void start_rwlock_wrwait_noop(PSI_rwlock_locker* locker,
-                                     const char *src_file, uint src_line)
+static void start_rwlock_wrwait_noop(PSI_rwlock_locker* locker NNN,
+                                     const char *src_file NNN,
+                                     uint src_line NNN)
 {
   return;
 }
 
-static void end_rwlock_wrwait_noop(PSI_rwlock_locker* locker, int rc)
+static void end_rwlock_wrwait_noop(PSI_rwlock_locker* locker NNN, int rc NNN)
 {
   return;
 }
 
-static void start_cond_wait_noop(PSI_cond_locker* locker,
-                                 const char *src_file, uint src_line)
+static void start_cond_wait_noop(PSI_cond_locker* locker NNN,
+                                 const char *src_file NNN, uint src_line NNN)
 {
   return;
 }
 
-static void end_cond_wait_noop(PSI_cond_locker* locker, int rc)
+static void end_cond_wait_noop(PSI_cond_locker* locker NNN, int rc NNN)
 {
   return;
 }
 
-static void start_table_io_wait_noop(PSI_table_locker* locker,
-                                     const char *src_file, uint src_line)
+static void start_table_io_wait_noop(PSI_table_locker* locker NNN,
+                                     const char *src_file NNN,
+                                     uint src_line NNN)
 {
   return;
 }
 
-static void end_table_io_wait_noop(PSI_table_locker* locker)
+static void end_table_io_wait_noop(PSI_table_locker* locker NNN)
 {
   return;
 }
 
-static void start_table_lock_wait_noop(PSI_table_locker* locker,
-                                       const char *src_file, uint src_line)
+static void start_table_lock_wait_noop(PSI_table_locker* locker NNN,
+                                       const char *src_file NNN,
+                                       uint src_line NNN)
 {
   return;
 }
 
-static void end_table_lock_wait_noop(PSI_table_locker* locker)
+static void end_table_lock_wait_noop(PSI_table_locker* locker NNN)
 {
   return;
 }
 
-static PSI_file* start_file_open_wait_noop(PSI_file_locker *locker,
-                                           const char *src_file,
-                                           uint src_line)
+static PSI_file* start_file_open_wait_noop(PSI_file_locker *locker NNN,
+                                           const char *src_file NNN,
+                                           uint src_line NNN)
 {
   return NULL;
 }
 
-static void end_file_open_wait_noop(PSI_file_locker *locker)
+static void end_file_open_wait_noop(PSI_file_locker *locker NNN)
 {
   return;
 }
 
 static void end_file_open_wait_and_bind_to_descriptor_noop
-  (PSI_file_locker *locker, File file)
+  (PSI_file_locker *locker NNN, File file NNN)
 {
   return;
 }
 
-static void start_file_wait_noop(PSI_file_locker *locker,
-                                 size_t count,
-                                 const char *src_file,
-                                 uint src_line)
+static void start_file_wait_noop(PSI_file_locker *locker NNN,
+                                 size_t count NNN,
+                                 const char *src_file NNN,
+                                 uint src_line NNN)
 {
   return;
 }
 
-static void end_file_wait_noop(PSI_file_locker *locker,
-                               size_t count)
+static void end_file_wait_noop(PSI_file_locker *locker NNN,
+                               size_t count NNN)
 {
   return;
 }
 
-static void start_stage_noop(PSI_stage_key key, const char *src_file, int src_line)
+static void start_stage_noop(PSI_stage_key key NNN,
+                             const char *src_file NNN, int src_line NNN)
 {
   return;
 }
@@ -455,158 +491,161 @@ static void end_stage_noop()
 }
 
 static PSI_statement_locker*
-get_thread_statement_locker_noop(PSI_statement_locker_state *state,
-                                 PSI_statement_key key)
+get_thread_statement_locker_noop(PSI_statement_locker_state *state NNN,
+                                 PSI_statement_key key NNN)
 {
   return NULL;
 }
 
 static PSI_statement_locker*
-refine_statement_noop(PSI_statement_locker *locker,
-                      PSI_statement_key key)
+refine_statement_noop(PSI_statement_locker *locker NNN,
+                      PSI_statement_key key NNN)
 {
   return NULL;
 }
 
-static void start_statement_noop(PSI_statement_locker *locker,
-                                 const char *db, uint db_len,
-                                 const char *src_file, uint src_line)
+static void start_statement_noop(PSI_statement_locker *locker NNN,
+                                 const char *db NNN, uint db_len NNN,
+                                 const char *src_file NNN, uint src_line NNN)
 {
   return;
 }
 
-static void set_statement_text_noop(PSI_statement_locker *locker,
-                                    const char *text, uint text_len)
+static void set_statement_text_noop(PSI_statement_locker *locker NNN,
+                                    const char *text NNN, uint text_len NNN)
 {
   return;
 }
 
-static void set_statement_lock_time_noop(PSI_statement_locker *locker,
-                                         ulonglong count)
+static void set_statement_lock_time_noop(PSI_statement_locker *locker NNN,
+                                         ulonglong count NNN)
 {
   return;
 }
 
-static void set_statement_rows_sent_noop(PSI_statement_locker *locker,
-                                         ulonglong count)
+static void set_statement_rows_sent_noop(PSI_statement_locker *locker NNN,
+                                         ulonglong count NNN)
 {
   return;
 }
 
-static void set_statement_rows_examined_noop(PSI_statement_locker *locker,
-                                             ulonglong count)
+static void set_statement_rows_examined_noop(PSI_statement_locker *locker NNN,
+                                             ulonglong count NNN)
 {
   return;
 }
 
-static void inc_statement_created_tmp_disk_tables_noop(PSI_statement_locker *locker,
-                                                       ulong count)
+static void inc_statement_created_tmp_disk_tables_noop(PSI_statement_locker *locker NNN,
+                                                       ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_created_tmp_tables_noop(PSI_statement_locker *locker,
-                                                  ulong count)
+static void inc_statement_created_tmp_tables_noop(PSI_statement_locker *locker NNN,
+                                                  ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_select_full_join_noop(PSI_statement_locker *locker,
-                                                ulong count)
+static void inc_statement_select_full_join_noop(PSI_statement_locker *locker NNN,
+                                                ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_select_full_range_join_noop(PSI_statement_locker *locker,
-                                                      ulong count)
+static void inc_statement_select_full_range_join_noop(PSI_statement_locker *locker NNN,
+                                                      ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_select_range_noop(PSI_statement_locker *locker,
-                                            ulong count)
+static void inc_statement_select_range_noop(PSI_statement_locker *locker NNN,
+                                            ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_select_range_check_noop(PSI_statement_locker *locker,
-                                                  ulong count)
+static void inc_statement_select_range_check_noop(PSI_statement_locker *locker NNN,
+                                                  ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_select_scan_noop(PSI_statement_locker *locker,
-                                           ulong count)
+static void inc_statement_select_scan_noop(PSI_statement_locker *locker NNN,
+                                           ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_sort_merge_passes_noop(PSI_statement_locker *locker,
-                                                 ulong count)
+static void inc_statement_sort_merge_passes_noop(PSI_statement_locker *locker NNN,
+                                                 ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_sort_range_noop(PSI_statement_locker *locker,
-                                          ulong count)
+static void inc_statement_sort_range_noop(PSI_statement_locker *locker NNN,
+                                          ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_sort_rows_noop(PSI_statement_locker *locker,
-                                         ulong count)
+static void inc_statement_sort_rows_noop(PSI_statement_locker *locker NNN,
+                                         ulong count NNN)
 {
   return;
 }
 
-static void inc_statement_sort_scan_noop(PSI_statement_locker *locker,
-                                         ulong count)
+static void inc_statement_sort_scan_noop(PSI_statement_locker *locker NNN,
+                                         ulong count NNN)
 {
   return;
 }
 
-static void set_statement_no_index_used_noop(PSI_statement_locker *locker)
+static void set_statement_no_index_used_noop(PSI_statement_locker *locker NNN)
 {
   return;
 }
 
-static void set_statement_no_good_index_used_noop(PSI_statement_locker *locker)
+static void set_statement_no_good_index_used_noop(PSI_statement_locker *locker NNN)
 {
   return;
 }
 
-static void end_statement_noop(PSI_statement_locker *locker, void *stmt_da)
+static void end_statement_noop(PSI_statement_locker *locker NNN,
+                               void *stmt_da NNN)
 {
   return;
 }
 
-static void start_socket_wait_noop(PSI_socket_locker *locker,
-                                   size_t count,
-                                   const char *src_socket,
-                                   uint src_line)
+static void start_socket_wait_noop(PSI_socket_locker *locker NNN,
+                                   size_t count NNN,
+                                   const char *src_socket NNN,
+                                   uint src_line NNN)
 {
   return;
 }
 
-static void end_socket_wait_noop(PSI_socket_locker *locker, size_t count)
+static void end_socket_wait_noop(PSI_socket_locker *locker NNN,
+                                 size_t count NNN)
 {
   return;
 }
 
-static void set_socket_state_noop(PSI_socket *socket, PSI_socket_state state)
+static void set_socket_state_noop(PSI_socket *socket NNN,
+                                  enum PSI_socket_state state NNN)
 {
   return;
 }
 
-static void set_socket_info_noop(PSI_socket *socket,
-                                 const my_socket *fd,
-                                 const struct sockaddr *addr,
-                                 socklen_t addr_len)
+static void set_socket_info_noop(PSI_socket *socket NNN,
+                                 const my_socket *fd NNN,
+                                 const struct sockaddr *addr NNN,
+                                 socklen_t addr_len NNN)
 {
   return;
 }
 
-static void set_socket_thread_owner_noop(PSI_socket *socket)
+static void set_socket_thread_owner_noop(PSI_socket *socket NNN)
 {
   return;
 }

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-09-23 09:23:16 +0000
+++ b/sql/mysqld.cc	2011-09-23 14:20:16 +0000
@@ -7220,7 +7220,7 @@ static void print_help()
   my_print_variables(&all_options[0]);
 
   free_root(&mem_root, MYF(0));
-  all_options.clear();
+  vector<my_option>().swap(all_options);  // Deletes the vector contents.
 }
 
 static void usage(void)
@@ -7855,7 +7855,7 @@ static int get_options(int *argc_ptr, ch
     return ho_error;
 
   if (!opt_help)
-    all_options.clear();
+    vector<my_option>().swap(all_options);  // Deletes the vector contents.
 
   /* Add back the program name handle_options removes */
   (*argc_ptr)++;

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2011-08-30 13:02:53 +0000
+++ b/sql/sql_select.h	2011-09-23 14:20:16 +0000
@@ -890,7 +890,8 @@ protected:
   /* Shall calculate how much space is remaining in the join buffer */ 
   virtual ulong rem_space() 
   { 
-    return std::max<ulong>(buff_size-(end_pos-buff)-aux_buff_size, 0UL);
+    using std::max;
+    return max(buff_size-(end_pos-buff)-aux_buff_size, 0UL);
   }
 
   /* Shall skip record from the join buffer if its match flag is on */
@@ -1374,7 +1375,8 @@ protected:
   */ 
   ulong rem_space() 
   { 
-    return std::max<size_t>(last_key_entry-end_pos-aux_buff_size, 0UL);
+    using std::max;
+    return max(last_key_entry-end_pos-aux_buff_size, 0UL);
   }
 
   /* 

=== modified file 'sql/sql_table.h'
--- a/sql/sql_table.h	2011-09-12 13:56:50 +0000
+++ b/sql/sql_table.h	2011-09-23 14:20:16 +0000
@@ -18,7 +18,7 @@
 
 #include "my_global.h"                          /* my_bool */
 #include "my_pthread.h"
-#include "m_ctype.h"
+#include "m_ctype.h"                            /* CHARSET_INFO */
 
 class Alter_info;
 class Create_field;

=== modified file 'storage/heap/CMakeLists.txt'
--- a/storage/heap/CMakeLists.txt	2011-09-01 10:41:37 +0000
+++ b/storage/heap/CMakeLists.txt	2011-09-23 14:20:16 +0000
@@ -27,11 +27,9 @@ MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} ST
 IF(WITH_UNIT_TESTS)
   ADD_EXECUTABLE(hp_test1 hp_test1.c)
   TARGET_LINK_LIBRARIES(hp_test1 heap mysys)
-  SET_TARGET_PROPERTIES(hp_test1 PROPERTIES LINKER_LANGUAGE CXX)
   ADD_TEST(hp_test1 hp_test1)
 
   ADD_EXECUTABLE(hp_test2 hp_test2.c)
   TARGET_LINK_LIBRARIES(hp_test2 heap mysys)
-  SET_TARGET_PROPERTIES(hp_test2 PROPERTIES LINKER_LANGUAGE CXX)
   ADD_TEST(hp_test2 hp_test2)
 ENDIF()

=== modified file 'storage/myisam/CMakeLists.txt'
--- a/storage/myisam/CMakeLists.txt	2011-09-01 10:41:37 +0000
+++ b/storage/myisam/CMakeLists.txt	2011-09-23 14:20:16 +0000
@@ -35,19 +35,15 @@ TARGET_LINK_LIBRARIES(myisam mysys)
 
 MYSQL_ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
 TARGET_LINK_LIBRARIES(myisam_ftdump myisam)
-SET_TARGET_PROPERTIES(myisam_ftdump PROPERTIES LINKER_LANGUAGE CXX)
 
 MYSQL_ADD_EXECUTABLE(myisamchk myisamchk.c)
 TARGET_LINK_LIBRARIES(myisamchk myisam)
-SET_TARGET_PROPERTIES(myisamchk PROPERTIES LINKER_LANGUAGE CXX)
 
 MYSQL_ADD_EXECUTABLE(myisamlog myisamlog.c)
 TARGET_LINK_LIBRARIES(myisamlog myisam)
-SET_TARGET_PROPERTIES(myisamlog PROPERTIES LINKER_LANGUAGE CXX)
 
 MYSQL_ADD_EXECUTABLE(myisampack myisampack.c)
 TARGET_LINK_LIBRARIES(myisampack myisam)
-SET_TARGET_PROPERTIES(myisampack PROPERTIES LINKER_LANGUAGE CXX)
 
 IF(WITH_UNIT_TESTS AND FALSE)
   ADD_EXECUTABLE(mi_test1 mi_test1.c)

=== modified file 'unittest/gunit/gunit_test_main.cc'
--- a/unittest/gunit/gunit_test_main.cc	2011-09-01 10:41:37 +0000
+++ b/unittest/gunit/gunit_test_main.cc	2011-09-23 14:20:16 +0000
@@ -16,10 +16,8 @@
 // First include (the generated) my_config.h, to get correct platform defines,
 // then gtest.h (before any other MySQL headers), to avoid min() macros etc ...
 #include "my_config.h"
-#include "my_global.h"                          // didrik
 #include <gtest/gtest.h>
 
-#include "mdl.h"                                // SHOULD BE my_sys.h
 #include "my_getopt.h"
 
 #include <stdlib.h>

=== modified file 'unittest/mysys/CMakeLists.txt'
--- a/unittest/mysys/CMakeLists.txt	2011-09-01 10:41:37 +0000
+++ b/unittest/mysys/CMakeLists.txt	2011-09-23 14:20:16 +0000
@@ -23,7 +23,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/
 MACRO (MY_ADD_TEST name)
   ADD_EXECUTABLE(${name}-t ${name}-t.c)
   TARGET_LINK_LIBRARIES(${name}-t mytap mysys strings)
-  SET_TARGET_PROPERTIES(${name}-t PROPERTIES LINKER_LANGUAGE CXX)
   ADD_TEST(${name} ${name}-t)
 ENDMACRO()
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3449 to 3450) Tor Didriksen24 Sep