diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-10-15 10:26:08 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-10-15 10:26:08 +0400 |
commit | a9240dce9e2f32941611b4f1a52e3b30a1508fc2 (patch) | |
tree | ab7a7ec71341e29676d9a6bb039aeface4f88ce6 /libmysqld | |
parent | 2c0a073970cf5f1dc679b34bb13e7fc55109dfd0 (diff) | |
parent | eb2c6f451392396ef2ca74f1dba761fc4459d171 (diff) | |
download | mariadb-git-a9240dce9e2f32941611b4f1a52e3b30a1508fc2.tar.gz |
Merge 10.0-base -> 10.0
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 5 | ||||
-rw-r--r-- | libmysqld/examples/CMakeLists.txt | 5 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 91e4d9aa80b..874428d456c 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -22,7 +22,8 @@ ${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/libmysqld ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/sql -${CMAKE_SOURCE_DIR}/regex +${CMAKE_BINARY_DIR}/pcre +${CMAKE_SOURCE_DIR}/pcre ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS} @@ -122,7 +123,7 @@ ENDIF() SET(LIBS - dbug strings regex mysys mysys_ssl vio + dbug strings mysys mysys_ssl pcre vio ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${MYSQLD_STATIC_PLUGIN_LIBS} diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index 559b1d9ae32..cf23fdc4a6a 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -15,7 +15,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libmysqld/include - ${CMAKE_SOURCE_DIR}/regex + ${CMAKE_BINARY_DIR}/pcre + ${CMAKE_SOURCE_DIR}/pcre ${CMAKE_SOURCE_DIR}/sql ${MY_READLINE_INCLUDE_DIR} ) @@ -34,7 +35,7 @@ ENDIF(UNIX) MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc COMPONENT Test) -TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver) +TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre pcreposix) IF(CMAKE_GENERATOR MATCHES "Xcode") # It does not seem possible to tell Xcode the resulting target might need diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index d00556c3f17..458af24ce34 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -416,11 +416,13 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row) static void emb_free_embedded_thd(MYSQL *mysql) { THD *thd= (THD*)mysql->thd; + mysql_mutex_lock(&LOCK_thread_count); thd->clear_data_list(); thread_count--; thd->store_globals(); thd->unlink(); delete thd; + mysql_mutex_unlock(&LOCK_thread_count); my_pthread_setspecific_ptr(THR_THD, 0); mysql->thd=0; } @@ -687,8 +689,10 @@ void *create_embedded_thd(int client_flag) thd->data_tail= &thd->first_data; bzero((char*) &thd->net, sizeof(thd->net)); + mysql_mutex_lock(&LOCK_thread_count); thread_count++; threads.append(thd); + mysql_mutex_unlock(&LOCK_thread_count); thd->mysys_var= 0; return thd; err: |