MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:November 19 2009 11:14pm
Subject:bzr commit into mysql-5.6-next-mr-bugfixing branch
(mattias.jonsson:2956) Bug#32115
View as plain text  
#At file:///Users/mattiasj/clones/bzrroot/b32115-n-mr-bf/ based on revid:guilhem@stripped

 2956 Mattias Jonsson	2009-11-20
      Bug#32115: Bad use of Name_resolution_context from current LEX in partitioning
      
      port from mysql-next (5.4) to mysql-next-mr-bugfixing (5.5/5.6?)
      
      2755 Konstantin Osipov	2008-11-27
      Bug#32115 will remove the pre-requisite to initialize LEX to open tables.
      This dependency was added in 5.1 and was supposed to be removed in 6.0.
      Remove asserts and initialization of LEX in places where we don't deal
      with partitioned tables.
     @ sql/sp_head.cc
        Fix a typo.

    modified:
      sql/event_scheduler.cc
      sql/events.cc
      sql/sp_head.cc
      sql/sql_acl.cc
      sql/sql_base.cc
      sql/sql_parse.cc
      sql/sql_plugin.cc
      sql/sql_servers.cc
      sql/sql_udf.cc
      sql/table.cc
      sql/tztime.cc
=== modified file 'sql/event_scheduler.cc'
--- a/sql/event_scheduler.cc	2009-10-13 18:29:28 +0000
+++ b/sql/event_scheduler.cc	2009-11-19 23:13:54 +0000
@@ -128,7 +128,6 @@ post_init_event_thread(THD *thd)
     thd->cleanup();
     return TRUE;
   }
-  lex_start(thd);
 
   pthread_mutex_lock(&LOCK_thread_count);
   threads.append(thd);

=== modified file 'sql/events.cc'
--- a/sql/events.cc	2009-11-05 20:28:35 +0000
+++ b/sql/events.cc	2009-11-19 23:13:54 +0000
@@ -925,7 +925,6 @@ Events::init(my_bool opt_noacl_or_bootst
   */
   thd->thread_stack= (char*) &thd;
   thd->store_globals();
-  lex_start(thd);
 
   /*
     We will need Event_db_repository anyway, even if the scheduler is

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2009-11-06 15:28:25 +0000
+++ b/sql/sp_head.cc	2009-11-19 23:13:54 +0000
@@ -4005,7 +4005,7 @@ sp_head::add_used_tables_to_table_list(T
 
 
 /**
-  Simple function for adding an explicetly named (systems) table to
+  Simple function for adding an explicitly named (systems) table to
   the global table list, e.g. "mysql", "proc".
 */
 

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2009-11-06 14:20:27 +0000
+++ b/sql/sql_acl.cc	2009-11-19 23:13:54 +0000
@@ -276,7 +276,6 @@ my_bool acl_init(bool dont_read_acl_tabl
     DBUG_RETURN(1); /* purecov: inspected */
   thd->thread_stack= (char*) &thd;
   thd->store_globals();
-  lex_start(thd);
   /*
     It is safe to call acl_reload() since acl_* arrays and hashes which
     will be freed there are global static objects and thus are initialized
@@ -3524,7 +3523,6 @@ my_bool grant_init()
     DBUG_RETURN(1);				/* purecov: deadcode */
   thd->thread_stack= (char*) &thd;
   thd->store_globals();
-  lex_start(thd);
   return_val=  grant_reload(thd);
   delete thd;
   /* Remember that we don't have a THD */

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2009-11-06 14:20:27 +0000
+++ b/sql/sql_base.cc	2009-11-19 23:13:54 +0000
@@ -2532,9 +2532,6 @@ TABLE *open_table(THD *thd, TABLE_LIST *
   HASH_SEARCH_STATE state;
   DBUG_ENTER("open_table");
 
-  /* Parsing of partitioning information from .frm needs thd->lex set up. */
-  DBUG_ASSERT(thd->lex->is_lex_started);
-
   /* find a unused table in the open table cache */
   if (refresh)
     *refresh=0;

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2009-11-12 12:13:43 +0000
+++ b/sql/sql_parse.cc	2009-11-19 23:13:54 +0000
@@ -7050,7 +7050,6 @@ bool reload_acl_and_cache(THD *thd, ulon
     {
       thd->thread_stack= (char*) &tmp_thd;
       thd->store_globals();
-      lex_start(thd);
     }
     
     if (thd)

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2009-11-10 07:31:33 +0000
+++ b/sql/sql_plugin.cc	2009-11-19 23:13:54 +0000
@@ -1359,7 +1359,6 @@ static void plugin_load(MEM_ROOT *tmp_ro
   }
   new_thd->thread_stack= (char*) &tables;
   new_thd->store_globals();
-  lex_start(new_thd);
   new_thd->db= my_strdup("mysql", MYF(0));
   new_thd->db_length= 5;
   bzero((uchar*)&tables, sizeof(tables));

=== modified file 'sql/sql_servers.cc'
--- a/sql/sql_servers.cc	2009-10-14 16:37:38 +0000
+++ b/sql/sql_servers.cc	2009-11-19 23:13:54 +0000
@@ -140,7 +140,6 @@ bool servers_init(bool dont_read_servers
     DBUG_RETURN(TRUE);
   thd->thread_stack= (char*) &thd;
   thd->store_globals();
-  lex_start(thd);
   /*
     It is safe to call servers_reload() since servers_* arrays and hashes which
     will be freed there are global static objects and thus are initialized

=== modified file 'sql/sql_udf.cc'
--- a/sql/sql_udf.cc	2009-11-05 20:28:35 +0000
+++ b/sql/sql_udf.cc	2009-11-19 23:13:54 +0000
@@ -135,7 +135,6 @@ void udf_init()
   initialized = 1;
   new_thd->thread_stack= (char*) &new_thd;
   new_thd->store_globals();
-  lex_start(new_thd);
   new_thd->set_db(db, sizeof(db)-1);
 
   bzero((uchar*) &tables,sizeof(tables));

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2009-11-02 11:10:04 +0000
+++ b/sql/table.cc	2009-11-19 23:13:54 +0000
@@ -1649,9 +1649,6 @@ int open_table_from_share(THD *thd, TABL
   DBUG_PRINT("enter",("name: '%s.%s'  form: 0x%lx", share->db.str,
                       share->table_name.str, (long) outparam));
 
-  /* Parsing of partitioning information from .frm needs thd->lex set up. */
-  DBUG_ASSERT(thd->lex->is_lex_started);
-
   error= 1;
   bzero((char*) outparam, sizeof(*outparam));
   outparam->in_use= thd;
@@ -1833,6 +1830,8 @@ int open_table_from_share(THD *thd, TABL
       thd->restore_active_arena(&part_func_arena, &backup_arena);
       goto partititon_err;
     }
+    /* fix_partition_func needs thd->lex set up. TODO: fix! */
+    DBUG_ASSERT(thd->lex->is_lex_started);
     outparam->part_info->is_auto_partitioned= share->auto_partitioned;
     DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned));
     /* we should perform the fix_partition_func in either local or

=== modified file 'sql/tztime.cc'
--- a/sql/tztime.cc	2009-10-14 16:37:38 +0000
+++ b/sql/tztime.cc	2009-11-19 23:13:54 +0000
@@ -1578,7 +1578,6 @@ my_tz_init(THD *org_thd, const char *def
     DBUG_RETURN(1);
   thd->thread_stack= (char*) &thd;
   thd->store_globals();
-  lex_start(thd);
 
   /* Init all memory structures that require explicit destruction */
   if (my_hash_init(&tz_names, &my_charset_latin1, 20,


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.6-next-mr-bugfixing branch(mattias.jonsson:2956) Bug#32115Mattias Jonsson20 Nov