diff options
author | unknown <monty@mysql.com> | 2003-12-11 06:24:08 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-12-11 06:24:08 +0200 |
commit | 287661e66cc1fea6730b357bb56d48c6d065ef43 (patch) | |
tree | 1122f20a76a6996599a4c136c6be17aecb8f8bf6 /include | |
parent | 4119451ba1065274be6435349a786f7995fd4dae (diff) | |
download | mariadb-git-287661e66cc1fea6730b357bb56d48c6d065ef43.tar.gz |
Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061)
mysql_server_init() now returns error code if something went wrong (Bug #2062)
Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened.
Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062)
Fixed bug in UNION statement with alias '*'. (Bug #1249)
Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024).
FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition.
HOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385)
include/config-win.h:
Ensure that USE_SYMDIR is set for all windows versions
(This is set in makefiles, so this is just an extra safety measure)
include/my_pthread.h:
Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061)
include/my_sys.h:
my_init() now returns error code if something went wrong
include/mysql.h:
mysql_once_init() now returns error code if something went wrong
include/mysql_com.h:
my_init() now returns error code if something went wrong
libmysql/libmysql.c:
mysql_server_init() and mysql_once_init() now returns error code if something went wrong (Bug #2062)
mysql-test/r/limit.result:
Update results
mysql-test/r/select_found.result:
Update results
mysql-test/r/union.result:
Update results
mysql-test/t/limit.test:
Added test for DELETE ... ORDER BY ... LIMIT (bug #1024)
mysql-test/t/select_found.test:
Added test for problem with impossible WHERE (Bug #1468)
mysql-test/t/union.test:
Added test for problem with alias '*' (Bug #1249)
mysys/mf_pack.c:
Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened.
mysys/my_init.c:
my_init() now returns error code if something went wrong
mysys/my_lib.c:
More debug information
mysys/my_thr_init.c:
Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062)
sql/sql_base.cc:
Fixed bug in UNION statement with alias '*'. (Bug #1249)
sql/sql_delete.cc:
Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024).
sql/sql_select.cc:
FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition.
sql/sql_show.cc:
SHOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385)
sql/sql_yacc.yy:
Allow syntax UNION DISTINCT
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 4 | ||||
-rw-r--r-- | include/my_pthread.h | 3 | ||||
-rw-r--r-- | include/my_sys.h | 2 | ||||
-rw-r--r-- | include/mysql.h | 2 | ||||
-rw-r--r-- | include/mysql_com.h | 2 |
5 files changed, 10 insertions, 3 deletions
diff --git a/include/config-win.h b/include/config-win.h index b30f50f0edb..e6f03a10afb 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -151,6 +151,10 @@ typedef uint rf_SetTimer; #define USE_MB_IDENT 1 #define USE_STRCOLL 1 +/* All windows servers should support .sym files */ +#undef USE_SYMDIR +#define USE_SYMDIR + /* If LOAD DATA LOCAL INFILE should be enabled by default */ #define ENABLED_LOCAL_INFILE 1 diff --git a/include/my_pthread.h b/include/my_pthread.h index 16a14ac5038..59367ee903c 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -115,6 +115,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #undef SAFE_MUTEX /* This will cause conflicts */ #define pthread_key(T,V) DWORD V #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) +#define pthread_key_delete(A) TlsFree(A) #define pthread_getspecific(A) (TlsGetValue(A)) #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) @@ -123,6 +124,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #else #define pthread_key(T,V) __declspec(thread) T V #define pthread_key_create(A,B) pthread_dummy(0) +#define pthread_key_delete(A) pthread_dummy(0) #define pthread_getspecific(A) (&(A)) #define my_pthread_getspecific(T,A) (&(A)) #define my_pthread_getspecific_ptr(T,V) (V) @@ -178,6 +180,7 @@ extern int pthread_mutex_destroy (pthread_mutex_t *); typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 */ #define pthread_key_create(A,B) thr_keycreate((A),(B)) +#define pthread_key_delete(A) thr_keydelete(A) #define pthread_handler_decl(A,B) void *A(void *B) #define pthread_key(T,V) pthread_key_t V diff --git a/include/my_sys.h b/include/my_sys.h index df8b9759e5d..acb4c01b4f1 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -577,7 +577,7 @@ extern int my_snprintf(char* to, size_t n, const char* fmt, ...); extern int my_message(uint my_err, const char *str,myf MyFlags); extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); extern int my_message_curses(uint my_err, const char *str,myf MyFlags); -extern void my_init(void); +extern my_bool my_init(void); extern void my_end(int infoflag); extern int my_redel(const char *from, const char *to, int MyFlags); extern int my_copystat(const char *from, const char *to, int MyFlags); diff --git a/include/mysql.h b/include/mysql.h index 0c91266e19c..3ffc014c449 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -426,7 +426,7 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); int simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg, unsigned long length, my_bool skipp_check); unsigned long net_safe_read(MYSQL* mysql); -void mysql_once_init(void); +int mysql_once_init(void); extern my_bool server_inited; diff --git a/include/mysql_com.h b/include/mysql_com.h index a874034ba46..e183a0ed423 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -241,7 +241,7 @@ void hash_password(unsigned long *result, const char *password); /* Some other useful functions */ -void my_init(void); +my_bool my_init(void); int load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv); my_bool my_thread_init(void); |