From a7d880f0b095939118594ecbeba953959ae8e351 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 22 Jun 2020 18:21:21 +0200 Subject: 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. --- storage/perfschema/pfs.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'storage/perfschema') diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index 1bb712f64cc..3e9198a6b6c 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -5466,6 +5466,7 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) switch(da->status()) { case Diagnostics_area::DA_OK_BULK: + case Diagnostics_area::DA_EOF_BULK: case Diagnostics_area::DA_EMPTY: break; case Diagnostics_area::DA_OK: @@ -5706,6 +5707,7 @@ void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da) switch (da->status()) { case Diagnostics_area::DA_OK_BULK: + case Diagnostics_area::DA_EOF_BULK: case Diagnostics_area::DA_EMPTY: break; case Diagnostics_area::DA_OK: -- cgit v1.2.1