1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Use an inline getter method (thd->is_error()) to query if there is an error

in THD.
In future the error may be stored elsewhere (not in net.report_error) and 
it's important to start using an opaque getter to simplify merges.
This commit is contained in:
kostja@bodhi.(none)
2007-10-30 20:08:16 +03:00
parent 0909d1f8cb
commit e4b353c40c
20 changed files with 82 additions and 68 deletions

View File

@ -1368,7 +1368,7 @@ bool select_send::send_data(List<Item> &items)
thd->sent_row_count++;
if (!thd->vio_ok())
DBUG_RETURN(0);
if (!thd->net.report_error)
if (! thd->is_error())
DBUG_RETURN(protocol->write());
protocol->remove_last_row();
DBUG_RETURN(1);
@ -1389,7 +1389,7 @@ bool select_send::send_eof()
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
if (!thd->net.report_error)
if (! thd->is_error())
{
::send_eof(thd);
status= 0;