diff options
author | hf@deer.(none) <> | 2003-09-26 15:33:13 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2003-09-26 15:33:13 +0500 |
commit | ba8fa76fa20f400d8adfe2aa14231a682df9ba79 (patch) | |
tree | f4b60e9394c6d88f0bd04731d87ae6203e987e3b /sql-common | |
parent | 7dd4cb58d64e55a72283e33deeadf8fa2ed38e56 (diff) | |
download | mariadb-git-ba8fa76fa20f400d8adfe2aa14231a682df9ba79.tar.gz |
SCRUM:
WL#604 Privileges in embedded library
code added to check privileges in embedded library
NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude
access-checking parts. Actually we now can exclude these parts from
standalone server as well. Do we need it?
Access checks are disabled in embedded server by default. One should
edit libmysqld/Makefile manually to get this working.
We definitely need the separate configure for embedded server
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 508ebef2e1e..62524bc78bf 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -48,14 +48,12 @@ #endif #define CLI_MYSQL_REAL_CONNECT cli_mysql_real_connect -#define CLI_MYSQL_CLOSE cli_mysql_close #undef net_flush my_bool net_flush(NET *net); #else /*EMBEDDED_LIBRARY*/ #define CLI_MYSQL_REAL_CONNECT mysql_real_connect -#define CLI_MYSQL_CLOSE mysql_close #endif /*EMBEDDED_LIBRARY*/ #if !defined(MYSQL_SERVER) && (defined(__WIN__) || defined(_WIN32) || defined(_WIN64)) @@ -2127,6 +2125,7 @@ static void mysql_close_free_options(MYSQL *mysql) my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.charset_dir,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.charset_name,MYF(MY_ALLOW_ZERO_PTR)); + my_free(mysql->options.client_ip,MYF(MY_ALLOW_ZERO_PTR)); if (mysql->options.init_commands) { DYNAMIC_ARRAY *init_commands= mysql->options.init_commands; @@ -2159,7 +2158,7 @@ static void mysql_close_free(MYSQL *mysql) } -void STDCALL CLI_MYSQL_CLOSE(MYSQL *mysql) +void STDCALL mysql_close(MYSQL *mysql) { DBUG_ENTER("mysql_close"); if (mysql) /* Some simple safety */ @@ -2529,6 +2528,8 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) case MYSQL_OPT_GUESS_CONNECTION: mysql->options.methods_to_use= option; break; + case MYSQL_SET_CLIENT_IP: + mysql->options.client_ip= my_strdup(arg, MYF(MY_WME)); default: DBUG_RETURN(1); } |