mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge 10.5 to 10.6
This commit is contained in:
@ -371,7 +371,7 @@ Diagnostics_area::set_eof_status(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("set_eof_status");
|
||||
/* Only allowed to report eof if has not yet reported an error */
|
||||
DBUG_ASSERT(! is_set());
|
||||
DBUG_ASSERT(!is_set() || (m_status == DA_EOF_BULK && is_bulk_op()));
|
||||
/*
|
||||
In production, refuse to overwrite an error or a custom response
|
||||
with an EOF packet.
|
||||
@ -384,11 +384,23 @@ Diagnostics_area::set_eof_status(THD *thd)
|
||||
number of warnings, since they are not available to the client
|
||||
anyway.
|
||||
*/
|
||||
m_statement_warn_count= (thd->spcont ?
|
||||
0 :
|
||||
current_statement_warn_count());
|
||||
if (m_status == DA_EOF_BULK)
|
||||
{
|
||||
if (!thd->spcont)
|
||||
m_statement_warn_count+= current_statement_warn_count();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (thd->spcont)
|
||||
{
|
||||
m_statement_warn_count= 0;
|
||||
m_affected_rows= 0;
|
||||
}
|
||||
else
|
||||
m_statement_warn_count= current_statement_warn_count();
|
||||
m_status= (is_bulk_op() ? DA_EOF_BULK : DA_EOF);
|
||||
}
|
||||
|
||||
m_status= DA_EOF;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user