List:Commits« Previous MessageNext Message »
From:sergeyv Date:January 16 2006 4:35pm
Subject:bk commit into 5.1 tree (SergeyV:1.2058)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of sergeyv. When sergeyv 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.2058 06/01/16 19:35:01 SergeyV@selena. +3 -0
  Changes to make mysqlslap buildable and runable on win32.

  client/mysqlslap.c
    1.16 06/01/16 19:34:51 SergeyV@selena. +33 -4
    Win32 specific code is added to build & run mysqlslap successfully on win32.

  VC++Files/mysql.sln
    1.10 06/01/16 19:34:51 SergeyV@selena. +50 -10
    mysqlslap.vcproj is added into mysql.sln

  VC++Files/client/mysqlslap.vcproj
    1.2 06/01/16 19:34:49 SergeyV@selena. +4 -3
    Added references to mysqlclient.lib & mysys.lib for mysqlslap build on win32.

# 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:	SergeyV
# Host:	selena.
# Root:	H:/MYSQL/src/#00000-mysql-5.1

--- 1.1/VC++Files/client/mysqlslap.vcproj	2005-12-18 22:10:55 +03:00
+++ 1.2/VC++Files/client/mysqlslap.vcproj	2006-01-16 19:34:49 +03:00
@@ -3,6 +3,7 @@
 	ProjectType="Visual C++"
 	Version="7.10"
 	Name="mysqlslap"
+	ProjectGUID="{2E9332CF-072A-4381-BF37-17C5AB4F8583}"
 	SccProjectName=""
 	SccLocalPath="">
 	<Platforms>
@@ -39,7 +40,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
 				OutputFile="../client_release/mysqlslap.exe"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
@@ -101,7 +102,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
 				OutputFile="../client_classic/mysqlslap.exe"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
@@ -161,7 +162,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
 				OutputFile="../client_debug/mysqlslap.exe"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"

--- 1.9/VC++Files/mysql.sln	2005-12-20 02:05:50 +03:00
+++ 1.10/VC++Files/mysql.sln	2006-01-16 19:34:51 +03:00
@@ -22,16 +22,16 @@
 	ProjectSection(ProjectDependencies) = postProject
 		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
 		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113} = {207E9014-C4D1-4F6D-B76F-BC7DD7E31113}
+		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
 		{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
+		{433BCD9B-15C5-4B11-B8BE-825EA98EACE6} = {433BCD9B-15C5-4B11-B8BE-825EA98EACE6}
 		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{B3BFA8E5-90CF-4794-96E0-0B03ACA57A30} = {B3BFA8E5-90CF-4794-96E0-0B03ACA57A30}
+		{8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B} = {8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
 		{86276BF8-FB93-49C8-8157-4F2181375CD0} = {86276BF8-FB93-49C8-8157-4F2181375CD0}
-		{8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B} = {8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B}
-		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
-		{433BCD9B-15C5-4B11-B8BE-825EA98EACE6} = {433BCD9B-15C5-4B11-B8BE-825EA98EACE6}
-		{B3BFA8E5-90CF-4794-96E0-0B03ACA57A30} = {B3BFA8E5-90CF-4794-96E0-0B03ACA57A30}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myTest", "libmysqltest\myTest.vcproj", "{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}"
@@ -49,36 +49,36 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisam_ftdump", "myisam_ftdump\myisam_ftdump.vcproj", "{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}"
 	ProjectSection(ProjectDependencies) = postProject
 		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
-		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisamchk", "myisamchk\myisamchk.vcproj", "{87CD9881-D234-4306-BBC6-0668C6168C0F}"
 	ProjectSection(ProjectDependencies) = postProject
 		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
-		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisamlog", "myisamlog\myisamlog.vcproj", "{194F5EE6-9440-4298-A6FE-A9B4B480B44C}"
 	ProjectSection(ProjectDependencies) = postProject
 		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
-		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisampack", "myisampack\myisampack.vcproj", "{EF833A1E-E358-4B6C-9C27-9489E85041CC}"
 	ProjectSection(ProjectDependencies) = postProject
 		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
-		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql", "client\mysql.vcproj", "{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}"
@@ -124,6 +124,7 @@
 		{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
 		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
 		{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
+		{433BCD9B-15C5-4B11-B8BE-825EA98EACE6} = {433BCD9B-15C5-4B11-B8BE-825EA98EACE6}
 		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
 		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B} = {F74653C4-8003-4A79-8F53-FC69E0AD7A9B}
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
@@ -131,7 +132,6 @@
 		{8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B} = {8A3A2CF1-E581-47CC-95DD-1D0DA85BE83B}
 		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
 		{86276BF8-FB93-49C8-8157-4F2181375CD0} = {86276BF8-FB93-49C8-8157-4F2181375CD0}
-		{433BCD9B-15C5-4B11-B8BE-825EA98EACE6} = {433BCD9B-15C5-4B11-B8BE-825EA98EACE6}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqldemb", "mysqldemb\mysqldemb.vcproj", "{37D9BA79-302E-4582-A545-CB5FF7982EA3}"
@@ -286,6 +286,10 @@
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlslap", "client\mysqlslap.vcproj", "{2E9332CF-072A-4381-BF37-17C5AB4F8583}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		classic = classic
@@ -1033,7 +1037,7 @@
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.ActiveCfg = TLS|Win32
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.Build.0 = TLS|Win32
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.ActiveCfg = TLS_DEBUG|Win32
-		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.Build.0 = TLS_debug|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.Build.0 = TLS_DEBUG|Win32
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.ActiveCfg = Release|Win32
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.Build.0 = Release|Win32
 		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Debug.ActiveCfg = Debug|Win32
@@ -1654,6 +1658,42 @@
 		{B3BFA8E5-90CF-4794-96E0-0B03ACA57A30}.TLS.Build.0 = Debug|Win32
 		{B3BFA8E5-90CF-4794-96E0-0B03ACA57A30}.TLS_DEBUG.ActiveCfg = Debug|Win32
 		{B3BFA8E5-90CF-4794-96E0-0B03ACA57A30}.TLS_DEBUG.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.classic.ActiveCfg = classic|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.classic.Build.0 = classic|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.classic nt.ActiveCfg = classic|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.classic nt.Build.0 = classic|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Debug.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Debug.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Classic.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Debug.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Pro.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_ProGPL.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_ProGPL.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Release.ActiveCfg = Release|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Embedded_Release.Build.0 = Release|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Max.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Max.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Max nt.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Max nt.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.nt.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.nt.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro gpl.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro gpl.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro gpl nt.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro gpl nt.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro nt.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.pro nt.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Release.ActiveCfg = Release|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.Release.Build.0 = Release|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.TLS.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.TLS.Build.0 = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.TLS_DEBUG.ActiveCfg = Debug|Win32
+		{2E9332CF-072A-4381-BF37-17C5AB4F8583}.TLS_DEBUG.Build.0 = Debug|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	EndGlobalSection

--- 1.15/client/mysqlslap.c	2006-01-12 23:27:16 +03:00
+++ 1.16/client/mysqlslap.c	2006-01-16 19:34:51 +03:00
@@ -85,13 +85,28 @@
 #include <stdarg.h>
 #include <sslopt-vars.h>
 #include <sys/types.h>
+#ifndef __WIN__
 #include <sys/wait.h>
+#endif
 #include <ctype.h>
 #include <my_pthread.h>
 
 #define MYSLAPLOCK "/myslaplock.lck"
 #define MYSLAPLOCK_DIR "/tmp"
 
+#ifdef __WIN__
+#define srandom  srand
+#define random   rand
+#define snprintf _snprintf
+#define USE_THREADS_DEFAULT TRUE
+#else
+#define USE_THREADS_DEFAULT FALSE
+#endif
+
+#ifdef HAVE_SMEM 
+static char *shared_memory_base_name=0;
+#endif
+
 static char **defaults_argv;
 
 static char *host= NULL, *opt_password= NULL, *user= NULL,
@@ -213,6 +228,17 @@
     return s + us;
 }
 
+#ifdef __WIN__
+static int gettimeofday(struct timeval *tp, void *tzp)
+{
+  unsigned int ticks;
+  ticks= GetTickCount();
+  tp->tv_usec= ticks*1000;
+  tp->tv_sec= ticks/1000;
+
+  return 0;
+}
+#endif
 
 int main(int argc, char **argv)
 {
@@ -222,7 +248,7 @@
   unsigned long long client_limit;
   statement *eptr;
 
-  DBUG_ENTER("main");
+  //DBUG_ENTER("main");
   MY_INIT(argv[0]);
 
   /* Seed the random number generator if we will be using it. */
@@ -353,7 +379,7 @@
   free_defaults(defaults_argv);
   my_end(0);
 
-  DBUG_RETURN(0); /* No compiler warnings */
+  return 0;
 }
 
 
@@ -452,7 +478,7 @@
   {"use-threads", OPT_USE_THREADS,
     "Use pthread calls instead of fork() calls (default on Windows)",
       (gptr*) &opt_use_threads, (gptr*) &opt_use_threads, 0, 
-      GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+      GET_NO_ARG, NO_ARG, USE_THREADS_DEFAULT, 0, 0, 0, 0, 0},
 #include <sslopt-longopts.h>
 #ifndef DONT_ALLOW_USER_CHANGE
   {"user", 'u', "User for login if not current user.", (gptr*) &user,
@@ -936,7 +962,6 @@
   DBUG_RETURN(0);
 }
 
-
 static int
 run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
 {
@@ -980,6 +1005,7 @@
       }
     }
   }
+#ifndef __WIN__
   else
   {
     fflush(NULL);
@@ -1020,6 +1046,7 @@
       }
     }
   }
+#endif
 
   /* Lets release use some clients! */
   if (!opt_slave)
@@ -1041,6 +1068,7 @@
     }
     my_lock(lock_file, F_UNLCK, 0, F_TO_EOF, MYF(0));
   }
+#ifndef __WIN__
   else
   {
 WAIT:
@@ -1051,6 +1079,7 @@
       DBUG_PRINT("info", ("Parent: child %d status %d", pid, status));
     }
   }
+#endif
   gettimeofday(&end_time, NULL);
 
   my_close(lock_file, MYF(0));
Thread
bk commit into 5.1 tree (SergeyV:1.2058)sergeyv16 Jan