From 59806e1004d205bae01673fe7ed9a60537112455 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Aug 2003 02:51:39 +0300 Subject: vio ssl structure renames (to get rid of ending _) Added TCP/IP read/write timeout for windows Check on windows if second server is started with same TCP/IP port BitKeeper/deleted/.del-have_openssl_2.inc~8c9f1a45676b698f: Delete: mysql-test/include/have_openssl_2.inc BitKeeper/deleted/.del-have_openssl_2.require~53bbdfc136fb514: Delete: mysql-test/r/have_openssl_2.require BitKeeper/deleted/.del-openssl_2.test~f2dfa927f19d14f8: Delete: mysql-test/t/openssl_2.test BitKeeper/etc/ignore: added libmysql/vio_priv.h libmysql_r/vio_priv.h client/mysql.cc: vio ssl structure renames include/violite.h: Cleanup violite.h interface (move things to vio_priv.h) libmysql/Makefile.am: Use vio_priv.h libmysql/Makefile.shared: Use vio_priv.h libmysqld/lib_vio.c: Added timeout for windows mysys/my_getopt.c: Indentaion cleanup sql/item_cmpfunc.cc: Remove compiler warnings sql/item_func.cc: Remove compiler warnings sql/mini_client.cc: vio ssl structure renames sql/mysqld.cc: Check on windows if second server is started with same TCP/IP port sql/net_serv.cc: Add read/write timeouts for windows sql/sql_acl.cc: vio ssl structure renames sql/sql_show.cc: vio ssl structure renames vio/vio.c: Added timeouts for windows vio/viosocket.c: Added timeouts for windows vio/viossl.c: Added timeouts for windows Cleaned up structure element names vio/viosslfactories.c: Added timeouts for windows Cleaned up structure element names --- libmysqld/lib_vio.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libmysqld') diff --git a/libmysqld/lib_vio.c b/libmysqld/lib_vio.c index 448c11f9abd..ccad6ac8b7e 100644 --- a/libmysqld/lib_vio.c +++ b/libmysqld/lib_vio.c @@ -218,4 +218,9 @@ my_bool vio_poll_read(Vio *vio,uint timeout) return 0; } + +void vio_timeout(Vio *vio __attribute__((unused)), + uint timeout __attribute__((unused))) +{ +} #endif /* HAVE_VIO */ -- cgit v1.2.1 From 2a5b413ab13bcbd5a9fbef914657c7fac2d27246 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Sep 2003 13:02:19 +0500 Subject: Fix for #1210 i fixed this in 4.1 in slightly different way libmysqld/lib_sql.cc: Initialization's flag was made global libmysqld/libmysqld.c: Check for mysql_server_init call added --- libmysqld/lib_sql.cc | 7 ++++--- libmysqld/libmysqld.c | 13 +++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'libmysqld') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index eddb326f6c4..52ff08b8787 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -306,7 +306,8 @@ char **copy_arguments(int argc, char **argv) extern "C" { -static my_bool inited, org_my_init_done; +static my_bool org_my_init_done; +my_bool server_inited; ulong max_allowed_packet, net_buffer_length; char ** copy_arguments_ptr= 0; @@ -338,9 +339,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) my_umask_dir=0700; // Default umask for new directories /* Only call MY_INIT() if it hasn't been called before */ - if (!inited) + if (!server_inited) { - inited=1; + server_inited=1; org_my_init_done=my_init_done; } if (!org_my_init_done) diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 782731d4765..20dde620131 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -74,6 +74,8 @@ static int send_file_to_server(MYSQL *mysql,const char *filename); static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, const char *from, ulong length); +extern char server_inited; + #define init_sigpipe_variables #define set_sigpipe(mysql) #define reset_sigpipe(mysql) @@ -802,6 +804,17 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, db ? db : "(Null)", user ? user : "(Null)")); + /* + Check mysql_server_init was called. + This code shouldn't be merged to 4.1 + */ + if (!server_inited) + { + net->last_errno=CR_UNKNOWN_ERROR; + strmov(net->last_error,ER(net->last_errno)); + goto error; + } + net->vio = 0; /* If something goes wrong */ /* use default options */ if (mysql->options.my_cnf_file || mysql->options.my_cnf_group) -- cgit v1.2.1 From 8272be9412ecf6566192260df7217a1bec7ffc99 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Sep 2003 20:06:50 +0300 Subject: Cleaned up last bug fixes Fix bug in SHOW GRANTS when there is a column privilege but no table privilege include/mysql.h: Make server_inited external libmysqld/libmysqld.c: Remove reference to (wrong) external variable mysql-test/r/grant.result: Fixed up grant test to not user 'user1' or 'user2' Check for bug in SHOW GRANTS when there is a column privilege but no table privilege mysql-test/r/mix_innodb_myisam_binlog.result: Change to use tables t1 and t2 mysql-test/t/grant.test: Fixed up grant test to not user 'user1' or 'user2' Check for bug in SHOW GRANTS when there is a column privilege but no table privilege mysql-test/t/mix_innodb_myisam_binlog.test: Change to use tables t1 and t2 sql/sql_acl.cc: Fix bug in SHOW GRANTS when there is a column privilege but no table privilege sql/sql_parse.cc: Use HAVE_REPLICATION instead of EMBEDDED_LIBRARY --- libmysqld/libmysqld.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libmysqld') diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 20dde620131..70ac4ce46c5 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -74,8 +74,6 @@ static int send_file_to_server(MYSQL *mysql,const char *filename); static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, const char *from, ulong length); -extern char server_inited; - #define init_sigpipe_variables #define set_sigpipe(mysql) #define reset_sigpipe(mysql) -- cgit v1.2.1