MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:timour Date:September 12 2006 2:51pm
Subject:bk commit into 5.0 tree (timour:1.2262)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka 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@stripped, 2006-09-12 17:51:25+03:00, timour@stripped +2 -0
  Merge tkatchaounov@production:/data0/mysqldev/my/mysql-5.0-release
  into  lamia.home:/home/timka/mysql/src/5.0-bug-21774-sm
  MERGE: 1.2244.25.1

  sql/sql_base.cc@stripped, 2006-09-12 17:51:21+03:00, timour@stripped +0 -0
    Auto merged
    MERGE: 1.349.1.1

  sql/sql_parse.cc@stripped, 2006-09-12 17:51:21+03:00, timour@stripped +0 -0
    Auto merged
    MERGE: 1.563.2.1

# 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:	timour
# Host:	lamia.home
# Root:	/home/timka/mysql/src/5.0-bug-21774-sm/RESYNC

--- 1.350/sql/sql_base.cc	2006-09-12 17:51:30 +03:00
+++ 1.351/sql/sql_base.cc	2006-09-12 17:51:30 +03:00
@@ -4453,7 +4453,20 @@ bool setup_tables(THD *thd, Name_resolut
   uint tablenr= 0;
   DBUG_ENTER("setup_tables");
 
-  context->table_list= context->first_name_resolution_table= tables;
+  /*
+    Due to the various call paths that lead to setup_tables() it may happen
+    that context->table_list and context->first_name_resolution_table can be
+    NULL (this is typically done when creating TABLE_LISTs internally).
+    TODO:
+    Investigate all cases when this my happen, initialize the name resolution
+    context correctly in all those places, and remove the context reset below.
+  */
+  if (!context->table_list || !context->first_name_resolution_table)
+  {
+    /* Test whether the context is in a consistent state. */
+    DBUG_ASSERT(!context->first_name_resolution_table && !context->table_list);
+    context->table_list= context->first_name_resolution_table= tables;
+  }
 
   /*
     this is used for INSERT ... SELECT.

--- 1.569/sql/sql_parse.cc	2006-09-12 17:51:30 +03:00
+++ 1.570/sql/sql_parse.cc	2006-09-12 17:51:30 +03:00
@@ -3344,8 +3344,6 @@ end_with_restore_list:
     DBUG_ASSERT(first_table == all_tables && first_table != 0);
     if ((res= insert_precheck(thd, all_tables)))
       break;
-    /* Skip first table, which is the table we are inserting in */
-    select_lex->context.table_list= first_table->next_local;
 
     if (!thd->locked_tables &&
         !(need_start_waiting= !wait_if_global_read_lock(thd, 0, 1)))
Thread
bk commit into 5.0 tree (timour:1.2262)timour12 Sep