Commit 2b9fdea8 authored by unknown's avatar unknown

Fixes for 5.1-arch repository to compile on Windows.


CMakeLists.txt:
  Moved zlib to be processed before extra as CMake doesn't handle
  forward references well.
client/CMakeLists.txt:
  Ensure that -DTHREADS is specified for mysqlslap.c
client/mysqlslap.c:
  Removed includes which are already included in client_priv.h
  Moved variable declarations to be at start of function before any
  code is emitted as VSC is strict.
parent caa6ddd9
...@@ -131,10 +131,10 @@ ADD_SUBDIRECTORY(dbug) ...@@ -131,10 +131,10 @@ ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(regex) ADD_SUBDIRECTORY(regex)
ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(mysys)
ADD_SUBDIRECTORY(zlib)
ADD_SUBDIRECTORY(extra/yassl) ADD_SUBDIRECTORY(extra/yassl)
ADD_SUBDIRECTORY(extra/yassl/taocrypt) ADD_SUBDIRECTORY(extra/yassl/taocrypt)
ADD_SUBDIRECTORY(extra) ADD_SUBDIRECTORY(extra)
ADD_SUBDIRECTORY(zlib)
ADD_SUBDIRECTORY(storage/heap) ADD_SUBDIRECTORY(storage/heap)
ADD_SUBDIRECTORY(storage/myisam) ADD_SUBDIRECTORY(storage/myisam)
ADD_SUBDIRECTORY(storage/myisammrg) ADD_SUBDIRECTORY(storage/myisammrg)
......
...@@ -95,6 +95,7 @@ ADD_EXECUTABLE(mysqladmin mysqladmin.cc) ...@@ -95,6 +95,7 @@ ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsock32) TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlslap mysqlslap.c) ADD_EXECUTABLE(mysqlslap mysqlslap.c)
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 dbug) TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 dbug)
ADD_EXECUTABLE(echo echo.c) ADD_EXECUTABLE(echo echo.c)
......
...@@ -82,10 +82,6 @@ TODO: ...@@ -82,10 +82,6 @@ TODO:
#define SELECT_TYPE_REQUIRES_PREFIX 5 #define SELECT_TYPE_REQUIRES_PREFIX 5
#include "client_priv.h" #include "client_priv.h"
#include <my_pthread.h>
#include <my_sys.h>
#include <m_string.h>
#include <mysql.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <my_dir.h> #include <my_dir.h>
#include <signal.h> #include <signal.h>
...@@ -1554,13 +1550,13 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1554,13 +1550,13 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
uint x; uint x;
struct timeval start_time, end_time; struct timeval start_time, end_time;
thread_context con; thread_context con;
pthread_t mainthread; /* Thread descriptor */
pthread_attr_t attr; /* Thread attributes */
DBUG_ENTER("run_scheduler"); DBUG_ENTER("run_scheduler");
con.stmt= stmts; con.stmt= stmts;
con.limit= limit; con.limit= limit;
pthread_t mainthread; /* Thread descriptor */
pthread_attr_t attr; /* Thread attributes */
pthread_attr_init(&attr); pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, pthread_attr_setdetachstate(&attr,
PTHREAD_CREATE_DETACHED); PTHREAD_CREATE_DETACHED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment