BUG#36135: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.

- Before sending EOF, check if we've already sent an error.

mysql-test/r/subselect3.result:
  BUG#36135: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
  - Testcase
mysql-test/t/subselect3.test:
  BUG#36135: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
  - Testcase
sql/sql_class.cc:
  BUG#36135: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
  - Before sending EOF, check if we've already sent an error.
This commit is contained in:
Sergey Petrunia 2008-08-19 17:15:29 +04:00
commit 0a6c95ce07
3 changed files with 73 additions and 2 deletions

View file

@ -1580,6 +1580,12 @@ bool select_send::send_eof()
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
/*
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_eof(thd);
is_result_set_started= 0;
return FALSE;