1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge from mysql-5.5-bugteam to mysql-5.5-runtime

No conflicts
This commit is contained in:
Jon Olav Hauglid
2010-11-16 10:05:19 +01:00
53 changed files with 2174 additions and 146 deletions

View File

@ -1881,8 +1881,9 @@ void select_to_file::send_error(uint errcode,const char *err)
bool select_to_file::send_eof()
{
int error= test(end_io_cache(&cache));
if (mysql_file_close(file, MYF(MY_WME)))
error= 1;
if (mysql_file_close(file, MYF(MY_WME)) || thd->is_error())
error= true;
if (!error)
{
::my_ok(thd,row_count);
@ -2923,6 +2924,13 @@ bool select_dumpvar::send_eof()
if (! row_count)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA));
/*
Don't send EOF if we're in error condition (which implies we've already
sent or are sending an error)
*/
if (thd->is_error())
return true;
::my_ok(thd,row_count);
return 0;
}