From a86e11ef153433cf52886692c493e90784e10ee2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Sep 2003 13:36:01 +0300 Subject: Block SIGPIPE also for not threaded client programs. Added --include and --libs_r options to mysql_config. Added mysql_get_client_version() to client library Fixed some minor benchmark issues acinclude.m4: Fixed that 'no' is printed if openssl not used configure.in: Fixed error message extra/comp_err.c: Skip lines before first { include/mysql.h: Indentation cleanup libmysql/libmysql.c: Block SIGPIPE also for not threaded programs. This is now done once in mysql_server_init() and not for every call to mysql_init(). Added mysql_get_client_version() libmysql/libmysql.def: added mysql_get_client_version scripts/Makefile.am: Add openssl libraries to mysql_config scripts/mysql_config.sh: Added options --include and --libs_r Added C compiler options to 'cflags' scripts/mysql_install_db.sh: Fixed tests with IN_RPM to not give warnings sql-bench/bench-init.pl.sh: Updated version number sql-bench/server-cfg.sh: Remove duplicate line sql-bench/test-alter-table.sh: Increase loops for more relevant test sql-bench/test-select.sh: Fix wrong test for count_distinct_2 tests/mail_to_db.pl: Default db and table for easier usage --- libmysql/libmysql.c | 13 +++++++------ libmysql/libmysql.def | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'libmysql') diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 9e32e60f7da..cd4e8c77f20 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1452,10 +1452,6 @@ mysql_init(MYSQL *mysql) after we return if this is not the case. */ mysql->rpl_pivot = 1; -#if defined(SIGPIPE) && defined(THREAD) && !defined(__WIN__) - if (!((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE)) - (void) signal(SIGPIPE,pipe_sig_handler); -#endif /* Only enable LOAD DATA INFILE by default if configured with @@ -1515,8 +1511,8 @@ void mysql_once_init(void) mysql_unix_port = env; } mysql_debug(NullS); -#if defined(SIGPIPE) && !defined(THREAD) && !defined(__WIN__) - (void) signal(SIGPIPE,SIG_IGN); +#if defined(SIGPIPE) && !defined(__WIN__) + (void) signal(SIGPIPE, SIG_IGN); #endif } #ifdef THREAD @@ -2911,6 +2907,11 @@ mysql_get_client_info(void) return (char*) MYSQL_SERVER_VERSION; } +ulong STDCALL mysql_get_client_version(void) +{ + return MYSQL_VERSION_ID; +} + int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def index baa8643b92d..542ab890e95 100644 --- a/libmysql/libmysql.def +++ b/libmysql/libmysql.def @@ -24,6 +24,7 @@ EXPORTS mysql_get_host_info mysql_get_proto_info mysql_get_server_info + mysql_get_client_version mysql_info mysql_init mysql_insert_id -- cgit v1.2.1