mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge client/mysqlbinlog.cc: Auto merged include/my_global.h: Auto merged mysql-test/extra/rpl_tests/rpl_insert_id.test: Auto merged mysql-test/t/show_check.test: Auto merged mysys/mf_iocache2.c: Auto merged sql/field.cc: Auto merged sql/item_xmlfunc.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_show.cc: Auto merged mysql-test/t/disabled.def: Manual merge sql/log.cc: Manual merge sql/sql_insert.cc: Manual merge
This commit is contained in:
commit
2a86b8ecfc
39 changed files with 1359 additions and 184 deletions
|
|
@ -50,7 +50,6 @@
|
|||
int
|
||||
my_b_copy_to_file(IO_CACHE *cache, FILE *file)
|
||||
{
|
||||
byte buf[IO_SIZE];
|
||||
uint bytes_in_cache;
|
||||
DBUG_ENTER("my_b_copy_to_file");
|
||||
|
||||
|
|
@ -58,19 +57,17 @@ my_b_copy_to_file(IO_CACHE *cache, FILE *file)
|
|||
if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE))
|
||||
DBUG_RETURN(1);
|
||||
bytes_in_cache= my_b_bytes_in_cache(cache);
|
||||
while (bytes_in_cache > 0) {
|
||||
uint const read_bytes= min(bytes_in_cache, sizeof(buf));
|
||||
DBUG_PRINT("debug", ("Remaining %u bytes - Reading %u bytes",
|
||||
bytes_in_cache, read_bytes));
|
||||
if (my_b_read(cache, buf, read_bytes))
|
||||
do
|
||||
{
|
||||
if (my_fwrite(file, cache->read_pos, bytes_in_cache,
|
||||
MYF(MY_WME | MY_NABP)) == (uint) -1)
|
||||
DBUG_RETURN(1);
|
||||
if (my_fwrite(file, buf, read_bytes, MYF(MY_WME | MY_NABP)) == (uint) -1)
|
||||
DBUG_RETURN(1);
|
||||
bytes_in_cache -= read_bytes;
|
||||
}
|
||||
cache->read_pos= cache->read_end;
|
||||
} while ((bytes_in_cache= my_b_fill(cache)));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
my_off_t my_b_append_tell(IO_CACHE* info)
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue