mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Closing tables during SP execution the proper way.
This commit is contained in:
@@ -801,15 +801,6 @@ void select_export::send_error(uint errcode, const char *err)
|
||||
|
||||
bool select_export::send_eof()
|
||||
{
|
||||
/* This mimics select_send::send_eof(), which unlocks this way.
|
||||
* It appears to be necessary, since tables aren't unlock after
|
||||
* selects otherwise.
|
||||
*/
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
int error=test(end_io_cache(&cache));
|
||||
if (my_close(file,MYF(MY_WME)))
|
||||
error=1;
|
||||
@@ -920,15 +911,6 @@ void select_dump::send_error(uint errcode,const char *err)
|
||||
|
||||
bool select_dump::send_eof()
|
||||
{
|
||||
/* This mimics select_send::send_eof(), which unlocks this way.
|
||||
* It appears to be necessary, since tables aren't unlock after
|
||||
* selects otherwise.
|
||||
*/
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
int error=test(end_io_cache(&cache));
|
||||
if (my_close(file,MYF(MY_WME)))
|
||||
error=1;
|
||||
@@ -1061,15 +1043,6 @@ bool select_dumpvar::send_data(List<Item> &items)
|
||||
|
||||
bool select_dumpvar::send_eof()
|
||||
{
|
||||
/* This mimics select_send::send_eof(), which unlocks this way.
|
||||
* It appears to be necessary, since tables aren't unlock after
|
||||
* selects otherwise.
|
||||
*/
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
if (row_count)
|
||||
{
|
||||
::send_ok(thd,row_count);
|
||||
|
||||
Reference in New Issue
Block a user