summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorunknown <monty@bitch.mysql.fi>2001-11-28 02:55:52 +0200
committerunknown <monty@bitch.mysql.fi>2001-11-28 02:55:52 +0200
commit06e1e27557cc6788fafd423eea6ca5073dce892a (patch)
tree40e5d73c964ca6aeb5e0e7d4294e70216edaa397 /sql/sql_repl.cc
parentf33fb18677d673f1bcb2d617355ea3e2dbb04f48 (diff)
downloadmariadb-git-06e1e27557cc6788fafd423eea6ca5073dce892a.tar.gz
New improved IO_CACHE
include/my_global.h: Remove dbug_assert() (One should use DBUG_ASSERT() instead) mysql-test/mysql-test-run.sh: Fixed that xterm works on Solaris 2.8. Fixed printing of errors mysql-test/r/isam.result: Removed MyISAM test from ISAM test mysql-test/t/isam.test: Removed MyISAM test from ISAM test mysys/my_alloc.c: Removed warnings mysys/my_bitmap.c: Use DBUG_ASSERT mysys/my_pthread.c: Use DBUG_ASSERT mysys/my_seek.c: More DBUG sql/ha_berkeley.cc: Use DBUG_ASSERT sql/ha_innobase.cc: Use DBUG_ASSERT sql/log.cc: Use DBUG_ASSERT sql/opt_range.cc: Use DBUG_ASSERT sql/sql_base.cc: Use DBUG_ASSERT sql/sql_handler.cc: Use DBUG_ASSERT sql/sql_load.cc: Cleanup sql/sql_parse.cc: Use DBUG_ASSERT sql/sql_repl.cc: Cleanup sql/sql_select.cc: Use DBUG_ASSERT tools/mysqlmanager.c: Cleanup
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 431f2ef5d5e..6c738ba36b4 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -137,7 +137,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
if ((file = my_open(log_file_name, O_RDONLY | O_BINARY, MYF(MY_WME))) < 0 ||
init_io_cache(log, file, IO_SIZE*2, READ_CACHE, 0, 0,
- MYF(MY_WME)))
+ MYF(MY_WME | MY_DONT_CHECK_FILESIZE)))
{
*errmsg = "Could not open log file"; // This will not be sent
goto err;
@@ -1024,8 +1024,10 @@ int log_loaded_block(IO_CACHE* file)
{
LOAD_FILE_INFO* lf_info;
uint block_len ;
- char* buffer = (char*)file->buffer;
- if (!(block_len = file->rc_end - buffer))
+
+ /* file->request_pos contains position where we started last read */
+ char* buffer = (char*) file->request_pos;
+ if (!(block_len = file->read_end - buffer))
return 0;
lf_info = (LOAD_FILE_INFO*)file->arg;
if (lf_info->last_pos_in_file != HA_POS_ERROR &&