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:
@ -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;
|
||||
|
Reference in New Issue
Block a user