MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:July 31 2005 2:47am
Subject:bk commit into 5.0 tree (sergefp:1.1916) BUG#12082
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey 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.1916 05/07/31 02:47:54 sergefp@stripped +1 -0
  Fix for BUG#12082 (assert failure when the query fails to get a lock for record in 'const' table):
   Set table->key_read back to 0 regardless of whether join_read_const() succeeded or not.

  sql/sql_select.cc
    1.345 05/07/31 02:47:50 sergefp@stripped +7 -6
    Fix for BUG#12082 (assert failure when the query fails to get a lock for record in 'const' table):
     Set table->key_read back to 0 regardless of whether join_read_const() succeeded or not.

# 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:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.0-bug12082

--- 1.344/sql/sql_select.cc	2005-07-25 19:51:44 +00:00
+++ 1.345/sql/sql_select.cc	2005-07-31 02:47:50 +00:00
@@ -9717,18 +9717,19 @@
       table->file->extra(HA_EXTRA_KEYREAD);
       tab->index= tab->ref.key;
     }
-    if ((error=join_read_const(tab)))
+    error=join_read_const(tab);
+    if (table->key_read)
+    {
+      table->key_read=0;
+      table->file->extra(HA_EXTRA_NO_KEYREAD);
+    }
+    if (error)
     {
       tab->info="unique row not found";
       /* Mark for EXPLAIN that the row was not found */
       pos->records_read=0.0;
       if (!table->maybe_null || error > 0)
 	DBUG_RETURN(error);
-    }
-    if (table->key_read)
-    {
-      table->key_read=0;
-      table->file->extra(HA_EXTRA_NO_KEYREAD);
     }
   }
   if (*tab->on_expr_ref && !table->null_row)
Thread
bk commit into 5.0 tree (sergefp:1.1916) BUG#12082Sergey Petrunia31 Jul