summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-12 04:34:56 +0200
committerunknown <monty@donna.mysql.com>2000-12-12 04:34:56 +0200
commit28ad76e22c799a933006e8cad31a7389e85106eb (patch)
tree3c78736b50f99b9b8ac968afb833752f201a482a /mysys/mf_iocache2.c
parent7847639270269bc6aebeed36e68ddfec0cf6c145 (diff)
downloadmariadb-git-28ad76e22c799a933006e8cad31a7389e85106eb.tar.gz
Fixed delete in tables with hidden primary key
Remove not used BDB logs on shutdown Don't give warnings for repair on slaves Fixed transaction log files Docs/manual.texi: Updated 'known bugs' include/my_sys.h: Added define for checking number of bytes left in the IO_CACHE mysql-test/mysql-test-run: Small bug fixes mysys/mf_iocache2.c: Use new define sql/filesort.cc: Temporary fix for FULLTEXT index sql/ha_berkeley.cc: Fix for delete in tables with hidden primary key Remove not used BDB logs on shutdown sql/ha_myisam.cc: Don't give warnings for repair on slaves sql/hostname.cc: Portability fix sql/log.cc: Fix transaction log files sql/log_event.h: portability fix sql/slave.cc: Don't give warnings for repair on slaves sql/sql_class.h: Cleanup sql/sql_parse.cc: Fixed typo
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index 4e44a632156..9880c1615bb 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -50,7 +50,8 @@ void my_b_seek(IO_CACHE *info,my_off_t pos)
}
/*
-** Fill buffer
+** Fill buffer. Note that this assumes that you have already used
+** all characters in the CACHE, independent of the rc_pos value!
** return: 0 on error or EOF (info->error = -1 on error)
** number of characters
*/
@@ -102,9 +103,9 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
uint length;
max_length--; /* Save place for end \0 */
/* Calculate number of characters in buffer */
- if (!(length= (uint) (info->rc_end - info->rc_pos)))
- if (!(length=my_b_fill(info)))
- return 0;
+ if (!(length= my_b_bytes_in_cache(info)) &&
+ !(length= my_b_fill(info)))
+ return 0;
for (;;)
{
char *pos,*end;