summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2003-08-19 17:00:36 +0200
committerguilhem@mysql.com <>2003-08-19 17:00:36 +0200
commit6e32e19047a745b465f7b169966a7112e2d12047 (patch)
tree572706e4da26928b7adb044c7b188049dfa27b97 /include/my_sys.h
parent1a5c8be4082616fa3347f1c4709cbd7969cd8f01 (diff)
downloadmariadb-git-6e32e19047a745b465f7b169966a7112e2d12047.tar.gz
Use my_b_append instead of my_b_write on a SEQ_READ_APPEND cache, when we write
the first 4 bytes of the relay log. Indeed comments in mysys/mf_iocache.c say we must always use my_b_append for such a cache. This *could* avoid a very rare assertion failure which is: 030524 19:32:38 Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '/ users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000001' position: 4 030524 19:32:38 next log '/users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000002' is currently active mysqld: mf_iocache.c:701: _my_b_seq_read: Assertion `pos_in_file == info->end_of_file' failed. and which seemed to happen always when the SQL thread and/or the I/O thread were at position 4 in a relay log.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 7f8b8a80a1c..9f4b91c8bf6 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -677,6 +677,8 @@ extern int _my_b_get(IO_CACHE *info);
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
+extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
+
extern int my_block_write(IO_CACHE *info, const byte *Buffer,
uint Count, my_off_t pos);
extern int _flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);