summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-07-01 15:47:45 +0400
committerunknown <konstantin@mysql.com>2005-07-01 15:47:45 +0400
commitd36c14f7488af415258b03b61e1e7dad74e1cdcb (patch)
treee1393e450cf0ca1709997362f5ef64d6b49532d2 /sql/sql_select.h
parent77532a6f578fb5fd3e48ded3ac0e05e2f8c7c44d (diff)
downloadmariadb-git-d36c14f7488af415258b03b61e1e7dad74e1cdcb.tar.gz
A fix and a test case for Bug#11172 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY date/datetime filter server crash". The fix adds support for Item_change_list in cursors (proper rollback of the modified item tree). sql/sql_class.cc: No need to call fatal_error() twice. sql/sql_prepare.cc: - implement proper cleanup of the prepared statement in mysql_stmt_reset if there is a cursor. - take into account thd->change_list when fetching data through a cursor. sql/sql_select.cc: - take into account thd->change_list when fetching data from a cursor: grab it when we open a cursor, and rollback the changes to the parsed tree when we close it. sql/sql_select.h: - Cursor::change_list added tests/mysql_client_test.c: - a test case for Bug#11172 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY date/datetime filter server crash"
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 6d33ae2f978..ac3e8898cc6 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -390,6 +390,7 @@ class Cursor: public Sql_alloc, public Query_arena
/* List of items created during execution */
query_id_t query_id;
public:
+ Item_change_list change_list;
select_send result;
/* Temporary implementation as now we replace THD state by value */
@@ -402,7 +403,8 @@ public:
void fetch(ulong num_rows);
void reset() { join= 0; }
bool is_open() const { return join != 0; }
- void close();
+
+ void close(bool is_active);
void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; }
Cursor(THD *thd);