MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:February 8 2007 5:38pm
Subject:bk commit into 5.1 tree (msvensson:1.2425) BUG#18159
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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, 2007-02-08 18:38:47+01:00, msvensson@stripped +4 -0
  Bug#18159 mysqlslap ld errors
   - All binaries in client/ where built with -DUNDEF_THREADS_HACK
     causing undefined symbols.
   - Fix that by only using UNDEF_THREADS_HACK on applications that
     really need it

  client/CMakeLists.txt@stripped, 2007-02-08 18:38:43+01:00, msvensson@stripped +10 -6
    Update mysqlbinlog to be built with all the files needed
    Fix long lines

  client/Makefile.am@stripped, 2007-02-08 18:38:43+01:00, msvensson@stripped +17 -19
    Remove symlinking of sources for programs built in client/
    Only use UNDEF_THREADS_HACK on programs that need it 

  client/mysqlbinlog.cc@stripped, 2007-02-08 18:38:44+01:00, msvensson@stripped +8 -20
    Update mysqlbinlog to be built without need to symlink files

  sql/log_event.cc@stripped, 2007-02-08 18:38:45+01:00, msvensson@stripped +15 -0
    Update log_event to be build with both mysqld and mysqlbinlog
    without being symlinked.

# 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:	msvensson
# Host:	pilot.mysql.com
# Root:	/home/msvensson/mysql/my51-bug18159

--- 1.83/client/Makefile.am	2006-12-31 01:06:32 +01:00
+++ 1.84/client/Makefile.am	2007-02-08 18:38:43 +01:00
@@ -18,9 +18,16 @@
 if THREAD_SAFE_CLIENT
 LIBMYSQLCLIENT_LA =		$(top_builddir)/libmysql_r/libmysqlclient_r.la
 else
+# The programs will adjust themselves not to compile in support for threads
+# when the threadsafe libmysqlclient library is not available
 LIBMYSQLCLIENT_LA =		$(top_builddir)/libmysql/libmysqlclient.la
 endif
 
+# Use this define on programs that doesn't use threads
+# and thus not need to use mutexes when accessing variables that
+# would otherwise need to be protected
+NOTHREADS =                     -DUNDEF_THREADS_HACK
+
 INCLUDES =			-I$(top_builddir)/include \
 				-I$(top_srcdir)/include \
 				-I$(top_srcdir)/regex \
@@ -51,6 +58,7 @@
 				completion_hash.cc
 mysql_LDADD =			@readline_link@ @TERMCAP_LIB@ \
 				$(LDADD) $(CXXLDFLAGS)
+
 mysqladmin_SOURCES =		mysqladmin.cc
 
 mysqlbinlog_SOURCES =		mysqlbinlog.cc \
@@ -59,15 +67,19 @@
 				$(top_srcdir)/mysys/my_bit.c \
 				$(top_srcdir)/mysys/my_bitmap.c \
 				$(top_srcdir)/mysys/my_vle.c \
-				$(top_srcdir)/mysys/base64.c
+				$(top_srcdir)/mysys/base64.c \
+				$(top_srcdir)/strings/decimal.c \
+				$(top_srcdir)/sql/log_event.cc \
+				$(top_srcdir)/sql/my_decimal.cc
 mysqlbinlog_LDADD =		$(LDADD) $(CXXLDFLAGS)
+mysqlbinlog_CXXFLAGS =          $(NOTHREADS) -DMYSQL_CLIENT
+mysqlbinlog_CFLAGS =            $(NOTHREADS)
 
 mysqldump_SOURCES=              mysqldump.c \
-				my_user.c \
+				$(top_srcdir)/sql-common/my_user.c \
 	                        $(top_srcdir)/mysys/mf_getdate.c
 
 mysqlimport_SOURCES=		mysqlimport.c
-
 mysqlimport_LDADD =		$(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
 				@CLIENT_EXTRA_LDFLAGS@ \
 				$(LIBMYSQLCLIENT_LA) \
@@ -85,29 +97,15 @@
 				$(top_srcdir)/mysys/my_getsystime.c \
 				$(top_srcdir)/mysys/my_copy.c
 mysqltest_LDADD =		$(top_builddir)/regex/libregex.a $(LDADD)
+mysqltest_CFLAGS =              $(NOTHREADS)
 
 mysql_upgrade_SOURCES=          mysql_upgrade.c \
                                 $(top_srcdir)/mysys/my_getpagesize.c
 
-# Fix for mit-threads
-DEFS =			-DUNDEF_THREADS_HACK \
-			-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
+DEFS =			-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
 			-DDATADIR="\"$(localstatedir)\""
 
-sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
-strings_src=decimal.c
-
 link_sources:
-	for f in $(sql_src) ; do \
-	  rm -f $$f; \
-	  @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
-         done; \
-        for f in $(strings_src) ; do \
-          rm -f $(srcdir)/$$f; \
-          @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
-         done; \
-         rm -f $(srcdir)/my_user.c; \
-         @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%

--- 1.265/sql/log_event.cc	2007-01-29 00:47:30 +01:00
+++ 1.266/sql/log_event.cc	2007-02-08 18:38:45 +01:00
@@ -25,7 +25,22 @@
 #include "rpl_filter.h"
 #include "rpl_utility.h"
 #include <my_dir.h>
+
+#else
+
+#include "client_priv.h"
+#include <my_time.h>
+#include "mysql_priv.h"
+
+#include "log_event.h"
+#include "my_decimal.h"
+
+void sql_print_error(const char *format, ...);
+
+extern my_bool force_opt;
+
 #endif /* MYSQL_CLIENT */
+
 #include <base64.h>
 #include <my_bitmap.h>
 

--- 1.147/client/mysqlbinlog.cc	2007-01-29 00:47:29 +01:00
+++ 1.148/client/mysqlbinlog.cc	2007-02-08 18:38:44 +01:00
@@ -28,13 +28,17 @@
    Format_desc_of_slave, Rotate_of_master, Format_desc_of_master.
 */
 
+#ifndef MYSQL_CLIENT
 #define MYSQL_CLIENT
+#endif
 #undef MYSQL_SERVER
 #include "client_priv.h"
 #include <my_time.h>
-/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
-#include "mysql_priv.h" 
-#include "log_event.h"
+
+/* These two is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
+#include "../sql/mysql_priv.h"
+#include "../sql/log_event.h"
+
 #include "sql_common.h"
 
 #define BIN_LOG_HEADER_SIZE	4
@@ -65,7 +69,7 @@
 static bool opt_hexdump= 0;
 static bool opt_base64_output= 0;
 static const char* database= 0;
-static my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
+my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
 static my_bool force_if_open_opt= 1;
 static ulonglong offset = 0;
 static const char* host = 0;
@@ -1593,20 +1597,4 @@
   DBUG_RETURN(exit_value);			// Keep compilers happy
 }
 
-/*
-  We must include this here as it's compiled with different options for
-  the server
-*/
-
-#if defined(__WIN__) && !defined(USING_CMAKE)
-#include "my_decimal.h"
-#include "decimal.c"
-#include "my_decimal.cpp"
-#include "log_event.cpp"
-#else
-#include "my_decimal.h"
-#include "decimal.c"
-#include "my_decimal.cc"
-#include "log_event.cc"
-#endif
 

--- 1.15/client/CMakeLists.txt	2006-12-31 01:37:58 +01:00
+++ 1.16/client/CMakeLists.txt	2007-02-08 18:38:43 +01:00
@@ -16,9 +16,6 @@
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
 
-# The old Windows build method used renamed (.cc -> .cpp) source files, fails
-# in #include in mysqlbinlog.cc. So disable that using the USING_CMAKE define.
-ADD_DEFINITIONS(-DUSING_CMAKE)
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
                     ${CMAKE_SOURCE_DIR}/zlib 
                     ${CMAKE_SOURCE_DIR}/extra/yassl/include 
@@ -86,9 +83,16 @@
 ADD_EXECUTABLE(mysqlshow mysqlshow.c)
 TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl taocrypt zlib wsock32)
 
-ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc ../mysys/mf_tempdir.c ../mysys/my_new.cc
-                           ../mysys/my_bit.c ../mysys/my_bitmap.c ../mysys/my_vle.c
-                           ../mysys/base64.c)
+ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc
+			   ../mysys/mf_tempdir.c
+			   ../mysys/my_new.cc
+                           ../mysys/my_bit.c
+			   ../mysys/my_bitmap.c
+			   ../mysys/my_vle.c
+                           ../mysys/base64.c
+			   ../strings/decimal.c
+			   ../sql/log_event.cc
+			   ../sql/my_decimal.cc)
 TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl taocrypt zlib wsock32)
 
 ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
Thread
bk commit into 5.1 tree (msvensson:1.2425) BUG#18159msvensson8 Feb