summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorunknown <iggy@recycle.(none)>2007-03-20 10:34:25 -0400
committerunknown <iggy@recycle.(none)>2007-03-20 10:34:25 -0400
commit6fb66342b36d0a5e3ed3aea53b86fc6d719a9cd9 (patch)
tree93d9aa9aaeb15926dff991fab145f7461d04b631 /include/my_sys.h
parent996843e51e3d9c18cc77886d3911f05ce79313b8 (diff)
downloadmariadb-git-6fb66342b36d0a5e3ed3aea53b86fc6d719a9cd9.tar.gz
Bug#23736 Pointer free error in mysqlbinlog
- Mis-matched SAFEMALLOC defines caused misleading error message. client/mysqlbinlog.cc: Bug#23736 Pointer free error in mysqlbinlog - Re-worked the Load_log_processor so that it frees it's resources before my_end is called. This is necessary because SAFEMALLOC's _my_free calls pthread_mutex_lock() using THR_LOCK_malloc which is cleaned up in my_end(). include/my_sys.h: Bug#23736 Pointer free error in mysqlbinlog - Define DYNAMIC_ARRAY beofore MY_TMPDIR - Add DYNAMIC_ARRAY to MY_TMP_DIR mysys/array.c: Bug#23736 Pointer free error in mysqlbinlog - SAFEMALLOC should not be unconditionally undef'd. mysys/mf_tempdir.c: Bug#23736 Pointer free error in mysqlbinlog - Use struct's DYNAMIC_ARRAY. - Use DYNAMIC_ARRAY:delete_dynamic function instead of my_free
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 533d50cb25f..63a1faf3995 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -322,8 +322,17 @@ struct st_my_file_info
extern struct st_my_file_info *my_file_info;
+typedef struct st_dynamic_array
+{
+ char *buffer;
+ uint elements,max_element;
+ uint alloc_increment;
+ uint size_of_element;
+} DYNAMIC_ARRAY;
+
typedef struct st_my_tmpdir
{
+ DYNAMIC_ARRAY full_list;
char **list;
uint cur, max;
#ifdef THREAD
@@ -331,14 +340,6 @@ typedef struct st_my_tmpdir
#endif
} MY_TMPDIR;
-typedef struct st_dynamic_array
-{
- char *buffer;
- uint elements,max_element;
- uint alloc_increment;
- uint size_of_element;
-} DYNAMIC_ARRAY;
-
typedef struct st_dynamic_string
{
char *str;