mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-21916: COM_STMT_BULK_EXECUTE with RETURNING insert wrong values
The problem is that array binding uses net buffer to read parameters for each execution while each execiting with RETURNING write in the same buffer. Solution is to allocate new net buffer to avoid changing buffer we are reading from.
This commit is contained in:
@ -960,6 +960,8 @@ public:
|
||||
DA_EOF,
|
||||
/** Set whenever one calls my_ok() in PS bulk mode. */
|
||||
DA_OK_BULK,
|
||||
/** Set whenever one calls my_eof() in PS bulk mode. */
|
||||
DA_EOF_BULK,
|
||||
/** Set whenever one calls my_error() or my_message(). */
|
||||
DA_ERROR,
|
||||
/** Set in case of a custom response, such as one from COM_STMT_PREPARE. */
|
||||
@ -1019,8 +1021,11 @@ public:
|
||||
enum_diagnostics_status status() const { return m_status; }
|
||||
|
||||
const char *message() const
|
||||
{ DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK ||
|
||||
m_status == DA_OK_BULK); return m_message; }
|
||||
{
|
||||
DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK ||
|
||||
m_status == DA_OK_BULK || m_status == DA_EOF_BULK);
|
||||
return m_message;
|
||||
}
|
||||
|
||||
bool skip_flush() const
|
||||
{
|
||||
@ -1055,7 +1060,7 @@ public:
|
||||
uint statement_warn_count() const
|
||||
{
|
||||
DBUG_ASSERT(m_status == DA_OK || m_status == DA_OK_BULK ||
|
||||
m_status == DA_EOF);
|
||||
m_status == DA_EOF ||m_status == DA_EOF_BULK );
|
||||
return m_statement_warn_count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user