summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index b19ca391672..21979b99285 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -212,6 +212,20 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
}
+my_off_t my_b_filelength(IO_CACHE *info)
+{
+ if (info->type == WRITE_CACHE)
+ {
+ return my_b_tell(info);
+ }
+ else
+ {
+ info->seek_not_done=0;
+ return my_seek(info->file,0L,MY_SEEK_END,MYF(0));
+ }
+}
+
+
/*
Simple printf version. Supports '%s', '%d', '%u', "%ld" and "%lu"
Used for logging in MySQL