List:Internals« Previous MessageNext Message »
From:ahristov Date:July 25 2005 3:51pm
Subject:bk commit into 5.0 tree (andrey:1.1890) BUG#11901
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1890 05/07/25 17:50:51 andrey@lmy004. +1 -0
  fix for bug #11901 (cursor on a statement with subqueries with order by leads to server crash)

  sql/sql_select.cc
    1.344 05/07/25 17:50:44 andrey@lmy004. +5 -5
    fix for bug #11901 (cursor on a statement with subqueries with order by leads to server crash)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	andrey
# Host:	lmy004.
# Root:	/home/andrey/mysql-5.0

--- 1.343/sql/sql_select.cc	2005-07-20 18:02:26 +02:00
+++ 1.344/sql/sql_select.cc	2005-07-25 17:50:44 +02:00
@@ -1641,13 +1641,13 @@
     */
     DBUG_ASSERT(error == 0);
     /*
-      curr_join is used only for reusable joins - that is, 
-      to perform SELECT for each outer row (like in subselects).
-      This join is main, so we know for sure that curr_join == join.
+      curr_join can be different than "this" (look at bug 11901).
+      Few nested queries, with an ORDER for the main query, lead to tmp table
+      thus curr_join becomes JOIN::tmp_join (copy of JOIN to be used with
+      tmp tables).
     */
-    DBUG_ASSERT(curr_join == this);
     /* Open cursor for the last join sweep */
-    error= thd->cursor->open(this);
+    error= thd->cursor->open(curr_join);
   }
   else
   {
Thread
bk commit into 5.0 tree (andrey:1.1890) BUG#11901ahristov25 Jul