diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-10-08 22:54:24 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-08 22:54:24 +0200 |
commit | 82e9f6d948132b71abd57d8413f97f0cc2208d82 (patch) | |
tree | 3ab146f819af46d42d93be133cea16b66ff5df7f /client | |
parent | c8d511293aae155210089b6de4143d11569af18d (diff) | |
parent | b9768521bdeb1a8069c7b871f4536792b65fd79b (diff) | |
download | mariadb-git-82e9f6d948132b71abd57d8413f97f0cc2208d82.tar.gz |
Merge remote-tracking branch 'mysql/5.5' into 5.5
Diffstat (limited to 'client')
-rw-r--r-- | client/CMakeLists.txt | 3 | ||||
-rw-r--r-- | client/mysqlimport.c | 12 |
2 files changed, 4 insertions, 11 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index e4507f9c8ba..e3edacc351c 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2015, 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 @@ -47,6 +47,7 @@ MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c) TARGET_LINK_LIBRARIES(mysqldump mysqlclient) MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c) +SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS") TARGET_LINK_LIBRARIES(mysqlimport mysqlclient) MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server) diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 686f26cebeb..1f047fdf4b3 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -1,5 +1,6 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2011, 2015, MariaDB 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 @@ -30,19 +31,14 @@ #include "client_priv.h" #include "mysql_version.h" -#ifdef HAVE_LIBPTHREAD -#include <my_pthread.h> -#endif #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ /* Global Thread counter */ uint counter; -#ifdef HAVE_LIBPTHREAD pthread_mutex_t counter_mutex; pthread_cond_t count_threshhold; -#endif static void db_error_with_table(MYSQL *mysql, char *table); static void db_error(MYSQL *mysql); @@ -568,7 +564,6 @@ static char *field_escape(char *to,const char *from,uint length) int exitcode= 0; -#ifdef HAVE_LIBPTHREAD pthread_handler_t worker_thread(void *arg) { int error; @@ -608,7 +603,6 @@ error: return 0; } -#endif int main(int argc, char **argv) @@ -628,7 +622,6 @@ int main(int argc, char **argv) } sf_leaking_memory=0; /* from now on we cleanup properly */ -#ifdef HAVE_LIBPTHREAD if (opt_use_threads && !lock_tables) { pthread_t mainthread; /* Thread descriptor */ @@ -682,7 +675,6 @@ int main(int argc, char **argv) pthread_attr_destroy(&attr); } else -#endif { MYSQL *mysql= 0; if (!(mysql= db_connect(current_host,current_db,current_user,opt_password))) |