diff options
author | unknown <konstantin@mysql.com> | 2005-06-09 18:17:45 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-06-09 18:17:45 +0400 |
commit | d0db70270c59c8def10980c76173b3072263ef25 (patch) | |
tree | 42b180780987eb4b179c41965fb88f3e1d721210 /sql/sql_select.h | |
parent | baae624cdbdec0cc1342f02a205d32b07f096011 (diff) | |
download | mariadb-git-d0db70270c59c8def10980c76173b3072263ef25.tar.gz |
A fix and test case for Bug#10729 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY". The bug was that we (me) don't perform proper
cleanups of the prepared statement when done fetching from a cursor.
Another patch.
sql/mysql_priv.h:
Rename reset_stmt_for_execute to init_stmt_before_use (to correspond to
cleanup_stmt_and_thd_after_use).
sql/sp_head.cc:
Rename.
sql/sql_prepare.cc:
Move common cleanup code to a cleanup function, call it when we close
a cursor.
sql/sql_select.cc:
Cleanup.
sql/sql_select.h:
No need for init_thd, this code has been inlined in Cursor::open.
tests/mysql_client_test.c:
Add a test case for Bug#10729 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY"
(problem reusing a prepared statemnt if there was a cursor)
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 49ac58e913b..5351bbb13d3 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -386,8 +386,6 @@ public: /* Temporary implementation as now we replace THD state by value */ /* Save THD state into cursor */ void init_from_thd(THD *thd); - /* Restore THD from cursor to continue cursor execution */ - void init_thd(THD *thd); /* bzero cursor state in THD */ void reset_thd(THD *thd); |