diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-11-08 22:27:55 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-11-08 22:27:55 -0700 |
commit | 1c809563c2ba3576e4584eda06125bf8a15850ee (patch) | |
tree | becb201de4801df50deca53f574595aa10ed70b3 /include | |
parent | 91fb1d23770503d29744fc0c973065decd1bf0a1 (diff) | |
download | mariadb-git-1c809563c2ba3576e4584eda06125bf8a15850ee.tar.gz |
fixed memory leak in replication
fixed bugs in new IO_CACHE code so that the old calls work
fixed shutdown bug
clean-up of mysql-test-run
include/my_sys.h:
fixes for IO_CACHE
mysql-test/mysql-test-run.sh:
fixed missing \ bug
added --skip-gdb-magic to skip Sergei's automatic mysql_parse break
do not delete the breakpoint in command - it crashes gdb sometimes
mysys/mf_iocache2.c:
rc_pos->write_pos in my_b_seek for WRITE_CACHE
sql/mysqld.cc:
fixed shutdown bug when singals DO break read introduced by the fix for
when they don't.
sql/repl_failsafe.cc:
fixed memory leak
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index f9df265df0f..cc5bdc104f8 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -359,7 +359,6 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\ ((info)->write_pos+=(Count)),0) : \ (*(info)->write_function)((info),(Buffer),(Count))) - #define my_b_get(info) \ @@ -370,17 +369,23 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); /* my_b_write_byte dosn't have any err-check */ #define my_b_write_byte(info,chr) \ - (((info)->rc_pos < (info)->rc_end) ?\ - ((*(info)->rc_pos++)=(chr)) :\ - (_my_b_write(info,0,0) , ((*(info)->rc_pos++)=(chr)))) + (((info)->write_pos < (info)->write_end) ?\ + ((*(info)->write_pos++)=(chr)) :\ + (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr)))) #define my_b_fill_cache(info) \ (((info)->rc_end=(info)->rc_pos),(*(info)->read_function)(info,0,0)) +#define my_write_cache(info) (((info)->type == WRITE_CACHE)) +#define my_cache_pointer(info) (my_write_cache(info) ? \ + ((info)->write_pos) : ((info)->rc_pos)) + #define my_b_tell(info) ((info)->pos_in_file + \ - ((info)->rc_pos - (info)->rc_request_pos)) + my_cache_pointer(info) - (info)->rc_request_pos) -#define my_b_bytes_in_cache(info) ((uint) ((info)->rc_end - (info)->rc_pos)) +#define my_b_bytes_in_cache(info) (my_write_cache(info) ? \ + ((uint) ((info)->write_end - (info)->write_pos)): \ + ((uint) ((info)->rc_end - (info)->rc_pos))) typedef struct st_changeable_var { const char *name; /* Name of variable */ |