diff options
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/Makefile.am | 21 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 16 | ||||
-rw-r--r-- | libmysqld/libmysqld.c | 8 |
3 files changed, 12 insertions, 33 deletions
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 3519c6e2541..91b0c4c17bb 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -157,27 +157,6 @@ if DARWIN_MWCC mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects) else -rm -f libmysqld.a - if test "$(host_os)" = "netware" ; \ - then \ - $(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \ - else \ - current_dir=`pwd`; \ - rm -rf tmp; mkdir tmp; \ - (for arc in $(INC_LIB) ./libmysqld_int.a; do \ - arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \ - artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \ - for F in `$(AR) t $$arc | grep -v SYMDEF`; do \ - if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \ - mkdir $$artmp; cd $$artmp > /dev/null; \ - $(AR) x ../../$$arc; \ - cd $$current_dir > /dev/null; \ - ls $$artmp/* | grep -v SYMDEF; \ - continue 2; fi; done; \ - done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \ - $(AR) r libmysqld.a $(storageobjects); \ - $(RANLIB) libmysqld.a ; \ - rm -rf tmp; \ - fi endif ## XXX: any time the client interface changes, we'll need to bump diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index b36a97759d2..94927c590cf 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -76,7 +76,7 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data) strmake(net->last_error, ei->info, sizeof(net->last_error)-1); memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate)); mysql->server_status= ei->server_status; - my_free(data, MYF(0)); + my_free(data); } static my_bool @@ -207,7 +207,7 @@ static MYSQL_FIELD *emb_list_fields(MYSQL *mysql) res= ((THD*) mysql->thd)->cur_data; ((THD*) mysql->thd)->cur_data= 0; mysql->field_alloc= res->alloc; - my_free(res,MYF(0)); + my_free(res); mysql->status= MYSQL_STATUS_READY; return mysql->fields; } @@ -236,7 +236,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt) stmt->fields= mysql->fields; stmt->mem_root= res->alloc; mysql->fields= NULL; - my_free(res,MYF(0)); + my_free(res); } return 0; @@ -293,7 +293,7 @@ static my_bool emb_read_query_result(MYSQL *mysql) thd->cur_data= res; } else - my_free(res, MYF(0)); + my_free(res); return 0; } @@ -335,7 +335,7 @@ int emb_read_binary_rows(MYSQL_STMT *stmt) return 1; } stmt->result= *data; - my_free((char *) data, MYF(0)); + my_free(data); set_stmt_errmsg(stmt, &stmt->mysql->net); return 0; } @@ -522,10 +522,10 @@ int init_embedded_server(int argc, char **argv, char **groups) mysql_data_home= mysql_real_data_home; mysql_data_home_len= mysql_real_data_home_len; - + /* Get default temporary directory */ opt_mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */ -#if defined( __WIN__) || defined(OS2) +#if defined(__WIN__) if (!opt_mysql_tmpdir) opt_mysql_tmpdir=getenv("TEMP"); if (!opt_mysql_tmpdir) @@ -590,7 +590,7 @@ int init_embedded_server(int argc, char **argv, char **groups) void end_embedded_server() { - my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR)); + my_free(copy_arguments_ptr); copy_arguments_ptr=0; clean_up(0); } diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 8f7503c9d6c..603fc3bc2f0 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -32,7 +32,7 @@ #ifdef HAVE_PWD_H #include <pwd.h> #endif -#if !defined(MSDOS) && !defined(__WIN__) +#if !defined(__WIN__) #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -54,7 +54,7 @@ extern ulong net_buffer_length; extern ulong max_allowed_packet; -#if defined(MSDOS) || defined(__WIN__) +#if defined(__WIN__) #define ERRNO WSAGetLastError() #define perror(A) #else @@ -119,8 +119,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, (mysql->options.my_cnf_file ? mysql->options.my_cnf_file : "my"), mysql->options.my_cnf_group); - my_free(mysql->options.my_cnf_file,MYF(MY_ALLOW_ZERO_PTR)); - my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR)); + my_free(mysql->options.my_cnf_file); + my_free(mysql->options.my_cnf_group); mysql->options.my_cnf_file=mysql->options.my_cnf_group=0; } |