diff options
author | monty@donna.mysql.com <> | 2000-09-16 04:27:21 +0300 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-09-16 04:27:21 +0300 |
commit | 751f2d1f160a6ba6be4ee93ddf308f552527c254 (patch) | |
tree | 6e20280a8abcc28d14385983250a3e1823639028 /mysys | |
parent | a99c1757be3ad053437a494442774227d61defbe (diff) | |
download | mariadb-git-751f2d1f160a6ba6be4ee93ddf308f552527c254.tar.gz |
Faster log::write() call, memory leak fix, flush master fix.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_format.c | 6 | ||||
-rw-r--r-- | mysys/mf_keycache.c | 3 | ||||
-rw-r--r-- | mysys/my_static.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/mysys/mf_format.c b/mysys/mf_format.c index 623f1dbd19e..39084799563 100644 --- a/mysys/mf_format.c +++ b/mysys/mf_format.c @@ -31,6 +31,7 @@ /* 8 Pack filename as short as possibly */ /* 16 Resolve symbolic links for filename */ /* 32 Resolve filename to full path */ + /* 64 Return NULL if too long path */ #ifdef MAXPATHLEN #define BUFF_LEN MAXPATHLEN @@ -80,7 +81,10 @@ my_string fn_format(my_string to, const char *name, const char *dsk, if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original */ - uint tmp_length=strlength(startpos); + uint tmp_length; + if (flag & 64) + return 0; + tmp_length=strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %d",dev,ext,length)); (void) strmake(to,startpos,min(tmp_length,FN_REFLEN-1)); } diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index db23c474564..72d0d4a5e10 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -85,7 +85,7 @@ int init_key_cache(ulong use_mem, if (key_cache_inited && _my_disk_blocks > 0) { - DBUG_PRINT("warning",("key cache allready in use")); /* purecov: inspected */ + DBUG_PRINT("warning",("key cache already in use")); /* purecov: inspected */ DBUG_RETURN(0); /* purecov: inspected */ } if (! key_cache_inited) @@ -161,6 +161,7 @@ void end_key_cache(void) _my_disk_blocks= -1; } } + key_cache_inited=0; DBUG_PRINT("status", ("used: %d changed: %d w_requests: %ld writes: %ld r_requests: %ld reads: %ld", _my_blocks_used,_my_blocks_changed,_my_cache_w_requests, diff --git a/mysys/my_static.h b/mysys/my_static.h index 5ab01dec9a9..e9d1a30b786 100644 --- a/mysys/my_static.h +++ b/mysys/my_static.h @@ -52,8 +52,6 @@ extern char NEAR curr_dir[FN_REFLEN],NEAR home_dir_buff[FN_REFLEN]; extern volatile int _my_signals; extern struct st_remember _my_sig_remember[MAX_SIGNALS]; -extern my_bool key_cache_inited; - extern const char *soundex_map; extern USED_MEM* my_once_root_block; |