mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user