diff options
author | monty@donna.mysql.com <> | 2001-01-08 00:04:30 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-01-08 00:04:30 +0200 |
commit | 6d0e529042f175d4a0522235239f33e8eca41cfb (patch) | |
tree | 500feaf42e43ee02e3822a280b03319bcd8f3abe /mysys/mf_iocache2.c | |
parent | 7541a877bcc007f58cb218fe18a4f4b18c7ba71a (diff) | |
download | mariadb-git-6d0e529042f175d4a0522235239f33e8eca41cfb.tar.gz |
Fixed bug when having many binary log files
Fixed bug when deleting keys with possible NULL values
many changes to mysqltest
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r-- | mysys/mf_iocache2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 9880c1615bb..1397c14515b 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -100,6 +100,7 @@ uint my_b_fill(IO_CACHE *info) uint my_b_gets(IO_CACHE *info, char *to, uint max_length) { + char *start = to; uint length; max_length--; /* Save place for end \0 */ /* Calculate number of characters in buffer */ @@ -115,10 +116,9 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length) { if ((*to++ = *pos++) == '\n') { - length= (uint) (pos-info->rc_pos); info->rc_pos=pos; *to='\0'; - return length; + return (uint) (to-start); } } if (!(max_length-=length)) @@ -126,7 +126,7 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length) /* Found enough charcters; Return found string */ info->rc_pos=pos; *to='\0'; - return length; + return (uint) (to-start); } if (!(length=my_b_fill(info))) return 0; |