Merge from mysql-5.1 to mysql-5.5

This commit is contained in:
Sujatha Sivakumar 2013-03-28 14:18:51 +05:30
commit 5c6611b546
4 changed files with 17 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -63,6 +63,8 @@ my_b_copy_to_file(IO_CACHE *cache, FILE *file)
DBUG_RETURN(1);
cache->read_pos= cache->read_end;
} while ((bytes_in_cache= my_b_fill(cache)));
if(cache->error == -1)
DBUG_RETURN(1);
DBUG_RETURN(0);
}
@ -219,6 +221,8 @@ size_t my_b_fill(IO_CACHE *info)
info->error= 0;
return 0; /* EOF */
}
DBUG_EXECUTE_IF ("simulate_my_b_fill_error",
{DBUG_SET("+d,simulate_file_read_error");});
if ((length= my_read(info->file,info->buffer,max_length,
info->myflags)) == (size_t) -1)
{

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -49,6 +49,13 @@ size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{

View File

@ -9393,6 +9393,8 @@ Write_rows_log_event::do_exec_row(const Relay_log_info *const rli)
#ifdef MYSQL_CLIENT
void Write_rows_log_event::print(FILE *file, PRINT_EVENT_INFO* print_event_info)
{
DBUG_EXECUTE_IF("simulate_cache_read_error",
{DBUG_SET("+d,simulate_my_b_fill_error");});
Rows_log_event::print_helper(file, print_event_info, "Write_rows");
}
#endif

View File

@ -2004,6 +2004,8 @@ bool show_binlogs(THD* thd)
if (protocol->write())
goto err;
}
if(index_file->error == -1)
goto err;
mysql_bin_log.unlock_index();
my_eof(thd);
DBUG_RETURN(FALSE);