summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-10-16 18:37:43 +0400
committerKonstantin Osipov <kostja@sun.com>2009-10-16 18:37:43 +0400
commitabb5e74df6c9198e403cebf4418d17ab71e23352 (patch)
tree28962c8ac0508355f874fc75d20cd72fee0396a9 /sql/handler.h
parent3138ee3be1caa12f05e28b8ea3b5264335d4ae07 (diff)
downloadmariadb-git-abb5e74df6c9198e403cebf4418d17ab71e23352.tar.gz
Backport of:
---------------------------------------------------------- revno: 2630.13.6 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3288 timestamp: Fri 2008-07-11 20:22:44 +0400 message: WL#3288, step 1: ensure that the SQL layer always closes an open cursor (rnd or index read) before closing a handler. sql/handler.h: Assert that the read is closed in handler destructor. sql/sql_select.cc: Remove JOIN::table which was a piece of redundancy. The problem was that JOIN::cleanup() works only if JOIN::table is not null, but JOIN::cleanup also assigns JOIN::table to NULL. This assignment is apparently there for safety, from the times when we had no support for correlated subqueries. Indeed, in case of a evaluation of a correlated subquery more than once it led to JOIN::cleanup doing nothing, and leaving the rnd or index read open. In do_select(), make sure we call JOIN::join_free() even in case of an error. sql/sql_select.h: Remove JOIN::table, JOIN::all_tables has the same functionality.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h
index ed5cc952b5d..41360998a37 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1152,7 +1152,7 @@ public:
virtual ~handler(void)
{
DBUG_ASSERT(locked == FALSE);
- /* TODO: DBUG_ASSERT(inited == NONE); */
+ DBUG_ASSERT(inited == NONE);
}
virtual handler *clone(MEM_ROOT *mem_root);
/** This is called after create to allow us to set up cached variables */