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/libmysqld.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libmysqld/libmysqld.c') 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/libmysqld.c') 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