diff options
author | unknown <monty@mysql.com> | 2004-05-07 01:44:07 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-07 01:44:07 +0300 |
commit | 33e6b2af85ec92a65669af5330f187f1d39e2b7a (patch) | |
tree | 45482fc4c7295d6167c15b718188a6df114ae764 /libmysql | |
parent | a6bd0b3c152185dc275d1130d0ed521523773068 (diff) | |
parent | f3544f3c5dd137e125a980c151e53ab71b23aba5 (diff) | |
download | mariadb-git-33e6b2af85ec92a65669af5330f187f1d39e2b7a.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
libmysql/libmysql.c:
Auto merged
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/client_settings.h | 6 | ||||
-rw-r--r-- | libmysql/libmysql.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/libmysql/client_settings.h b/libmysql/client_settings.h index a9695801e65..1c1ff9bac10 100644 --- a/libmysql/client_settings.h +++ b/libmysql/client_settings.h @@ -62,10 +62,4 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd); #ifdef EMBEDDED_LIBRARY int init_embedded_server(int argc, char **argv, char **groups); void end_embedded_server(); - -#else -/* Prevent warnings of unused parameters */ -#define init_embedded_server(a,b,c) ((void)a, (void)b, (void)c, 0) -#define end_embedded_server() #endif /*EMBEDDED_LIBRARY*/ - diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index a8a4b2449f3..4ecc1bd0584 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -113,7 +113,9 @@ static my_bool org_my_init_done= 0; 1 could not initialize environment (out of memory or thread keys) */ -int STDCALL mysql_server_init(int argc, char **argv, char **groups) +int STDCALL mysql_server_init(int argc __attribute__((unused)), + char **argv __attribute__((unused)), + char **groups __attribute__((unused))) { int result= 0; if (!mysql_client_init) @@ -152,7 +154,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) #if defined(SIGPIPE) && !defined(__WIN__) (void) signal(SIGPIPE, SIG_IGN); #endif +#ifdef EMBEDDED_LIBRARY result= init_embedded_server(argc, argv, groups); +#endif } #ifdef THREAD else @@ -164,7 +168,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) void STDCALL mysql_server_end() { +#ifdef EMBEDDED_LIBRARY end_embedded_server(); +#endif /* If library called my_init(), free memory allocated by it */ if (!org_my_init_done) { @@ -4055,7 +4061,9 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) MYSQL_FIELD *field; uchar *null_ptr, bit; uchar *row= (uchar*) data->data; +#ifndef DBUG_OFF uchar *row_end= row + data->length; +#endif null_ptr= row; row+= (stmt->field_count+9)/8; /* skip null bits */ |