diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-13 13:00:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-15 22:23:11 +0200 |
commit | a8773ef380609e238601dee94e026d99d4175696 (patch) | |
tree | 0afe3a4e6180dc7a93ed806d71d50984914783fe /libmysql | |
parent | a65623b3eb2695069791aa21d278b8bc751a560e (diff) | |
download | mariadb-git-a8773ef380609e238601dee94e026d99d4175696.tar.gz |
MDEV-12660 inconsistent mysql_stmt_close
remove dead code: this "return rc" could've never happened,
because reset_stmt_handle can only possibly fail if RESET_SERVER
flag is used.
But this "return rc" was confusing, it was under DBUG_ENTER (while
not being DBUG_RETURN) and it was skipping required stmt cleanup
at the end of the function.
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 3d787df804d..c07fad38802 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4713,8 +4713,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) { uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */ - if ((rc= reset_stmt_handle(stmt, RESET_ALL_BUFFERS | RESET_CLEAR_ERROR))) - return rc; + reset_stmt_handle(stmt, RESET_ALL_BUFFERS | RESET_CLEAR_ERROR); int4store(buff, stmt->stmt_id); if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))) |