diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2008-12-13 19:42:12 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2008-12-13 19:42:12 +0000 |
commit | 19f859a27e60270f3cdc7e2edc34e88c29536c21 (patch) | |
tree | 3ca8c469534126c025304d8d96dbeb2b359a6c00 /libmysqld | |
parent | 5c16a315ca28c18949e27b91cddf0886329d1dd4 (diff) | |
parent | ba816c14a9bc8012759da9d58f858f1e73bec708 (diff) | |
download | mariadb-git-19f859a27e60270f3cdc7e2edc34e88c29536c21.tar.gz |
merge 5.1 --> 5.1-rpl
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/examples/CMakeLists.txt | 8 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 10 | ||||
-rw-r--r-- | libmysqld/libmysqld.def | 66 |
3 files changed, 8 insertions, 76 deletions
diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index fde37830ddf..346278425a7 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -29,13 +29,13 @@ ADD_DEFINITIONS(-DEMBEDDED_LIBRARY) ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc ../../client/mysql.cc ../../client/readline.cc ../../client/sql_string.cc) -TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32) +TARGET_LINK_LIBRARIES(mysql_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32) ADD_DEPENDENCIES(mysql_embedded libmysqld) -ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc) -TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32) +ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c) +TARGET_LINK_LIBRARIES(mysqltest_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32) ADD_DEPENDENCIES(mysqltest_embedded libmysqld) ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c) -TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug mysys yassl taocrypt zlib strings wsock32) +TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32) ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 6e82812239e..23572ad4929 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -384,7 +384,9 @@ static void emb_free_embedded_thd(MYSQL *mysql) thd->clear_data_list(); thread_count--; thd->store_globals(); + thd->unlink(); delete thd; + my_pthread_setspecific_ptr(THR_THD, 0); mysql->thd=0; } @@ -538,12 +540,7 @@ int init_embedded_server(int argc, char **argv, char **groups) (void) thr_setconcurrency(concurrency); // 10 by default - if (flush_time && flush_time != ~(ulong) 0L) - { - pthread_t hThread; - if (pthread_create(&hThread,&connection_attrib,handle_manager,0)) - sql_print_error("Warning: Can't create thread to manage maintenance"); - } + start_handle_manager(); // FIXME initialize binlog_filter and rpl_filter if not already done // corresponding delete is in clean_up() @@ -627,6 +624,7 @@ void *create_embedded_thd(int client_flag) bzero((char*) &thd->net, sizeof(thd->net)); thread_count++; + threads.append(thd); return thd; err: delete(thd); diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def index 2aa75c0b23c..047cfe0fe57 100644 --- a/libmysqld/libmysqld.def +++ b/libmysqld/libmysqld.def @@ -2,34 +2,6 @@ LIBRARY LIBMYSQLD DESCRIPTION 'MySQL 5.1 Embedded Server Library' VERSION 5.1 EXPORTS - _dig_vec_upper - _dig_vec_lower - bmove_upp - delete_dynamic - free_defaults - getopt_compare_strings - getopt_ull_limit_value - handle_options - init_dynamic_array - insert_dynamic - int2str - is_prefix - list_add - list_delete - load_defaults - max_allowed_packet - my_cgets - my_end - my_getopt_print_errors - my_init - my_malloc - my_memdup - my_no_flags_free - my_path - my_print_help - my_print_variables - my_realloc - my_strdup mysql_thread_end mysql_thread_init myodbc_remove_escape @@ -102,47 +74,13 @@ EXPORTS mysql_thread_safe mysql_use_result mysql_warning_count - set_dynamic - strcend - strcont - strdup_root - strfill - strinstr - strmake - strmov - strxmov mysql_server_end mysql_server_init get_tty_password - sql_protocol_typelib mysql_get_server_version mysql_set_character_set mysql_sqlstate - charsets_dir - disabled_my_option - my_charset_latin1 - init_alloc_root - my_progname - get_charset_name - get_charset_by_csname - print_defaults - find_type - strxnmov - strend - my_fopen - my_fclose - unpack_filename - str2int - int10_to_str - longlong10_to_str - my_snprintf_8bit - alloc_root - free_root - my_read - llstr mysql_get_parameters - mysql_thread_init - mysql_thread_end mysql_stmt_bind_param mysql_stmt_bind_result mysql_stmt_execute @@ -170,7 +108,3 @@ EXPORTS mysql_stmt_attr_get mysql_stmt_attr_set mysql_stmt_field_count - get_defaults_options - my_charset_bin - my_charset_same - modify_defaults_file |