summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2021-06-17 14:53:22 +0700
committerSergei Golubchik <serg@mariadb.org>2021-06-17 19:30:25 +0200
commit44db6ffc192a3cca61be3fc2c1e977821ad2f733 (patch)
treed7d1f1e399d476a3e9385a7d1bf9b125008c41ba
parent3d752f0a3ac8eefacdc8dc1a152f0f32a2b5b7ae (diff)
downloadmariadb-git-44db6ffc192a3cca61be3fc2c1e977821ad2f733.tar.gz
MDEV-16708: fixed failure of the test sys_vars.sql_select_limit_func
This test failed in case it was run in PS mode and for embedded server The reason of test failure was that the following fields affected_row, server_status, insert_id of the structure MYSQL_STMT weren't update on calling mysql_stmt_next_result() in case combination of binary protocol and embedded server used.
-rw-r--r--libmysqld/libmysql.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c
index fbfe8b683c0..7a0843d32e5 100644
--- a/libmysqld/libmysql.c
+++ b/libmysqld/libmysql.c
@@ -4936,6 +4936,12 @@ int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
alloc_stmt_fields(stmt);
prepare_to_fetch_result(stmt);
}
+ else
+ {
+ stmt->affected_rows= stmt->mysql->affected_rows;
+ stmt->server_status= stmt->mysql->server_status;
+ stmt->insert_id= stmt->mysql->insert_id;
+ }
DBUG_RETURN(0);
}