Below is the list of changes that have just been committed into a local
5.1 repository of istruewing. When istruewing 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, 2007-10-14 19:28:30+02:00, istruewing@stripped +13 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Not to be pushed. Experimental patch. It shows at which places
it would be necessary to call lex_start() when all tables are
partitioned and need to parse the .frm file.
Added 'is_lex_started' to test if lex is initialized.
Initialized lex at many places for later use in open_table().
sql/event_scheduler.cc@stripped, 2007-10-14 19:28:27+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/events.cc@stripped, 2007-10-14 19:28:27+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/ha_ndbcluster_binlog.cc@stripped, 2007-10-14 19:28:27+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/slave.cc@stripped, 2007-10-14 19:28:27+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_acl.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +2 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_base.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +3 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Asserted that lex is initialized in open_table().
sql/sql_connect.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_lex.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +2 -1
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_lex.h@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_plugin.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_servers.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_udf.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/tztime.cc@stripped, 2007-10-14 19:28:28+02:00, istruewing@stripped +1 -0
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
diff -Nrup a/sql/event_scheduler.cc b/sql/event_scheduler.cc
--- a/sql/event_scheduler.cc 2007-08-15 17:08:40 +02:00
+++ b/sql/event_scheduler.cc 2007-10-14 19:28:27 +02:00
@@ -127,6 +127,7 @@ post_init_event_thread(THD *thd)
thd->cleanup();
return TRUE;
}
+ lex_start(thd);
pthread_mutex_lock(&LOCK_thread_count);
threads.append(thd);
diff -Nrup a/sql/events.cc b/sql/events.cc
--- a/sql/events.cc 2007-08-15 17:08:40 +02:00
+++ b/sql/events.cc 2007-10-14 19:28:27 +02:00
@@ -884,6 +884,7 @@ Events::init(my_bool opt_noacl)
*/
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
/*
We will need Event_db_repository anyway, even if the scheduler is
diff -Nrup a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
--- a/sql/ha_ndbcluster_binlog.cc 2007-09-07 11:15:04 +02:00
+++ b/sql/ha_ndbcluster_binlog.cc 2007-10-14 19:28:27 +02:00
@@ -3621,6 +3621,7 @@ pthread_handler_t ndb_binlog_thread_func
pthread_exit(0);
DBUG_RETURN(NULL);
}
+ lex_start(thd);
thd->init_for_queries();
thd->command= COM_DAEMON;
diff -Nrup a/sql/slave.cc b/sql/slave.cc
--- a/sql/slave.cc 2007-08-29 23:28:34 +02:00
+++ b/sql/slave.cc 2007-10-14 19:28:27 +02:00
@@ -1510,6 +1510,7 @@ static int init_slave_thread(THD* thd, S
delete thd;
DBUG_RETURN(-1);
}
+ lex_start(thd);
if (thd_type == SLAVE_THD_SQL)
thd->proc_info= "Waiting for the next event in relay log";
diff -Nrup a/sql/sql_acl.cc b/sql/sql_acl.cc
--- a/sql/sql_acl.cc 2007-08-13 15:11:13 +02:00
+++ b/sql/sql_acl.cc 2007-10-14 19:28:28 +02:00
@@ -277,6 +277,7 @@ 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
@@ -3493,6 +3494,7 @@ 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 */
diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
--- a/sql/sql_base.cc 2007-09-14 19:29:17 +02:00
+++ b/sql/sql_base.cc 2007-10-14 19:28:28 +02:00
@@ -2248,6 +2248,9 @@ 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;
diff -Nrup a/sql/sql_connect.cc b/sql/sql_connect.cc
--- a/sql/sql_connect.cc 2007-08-27 22:31:26 +02:00
+++ b/sql/sql_connect.cc 2007-10-14 19:28:28 +02:00
@@ -1087,6 +1087,7 @@ pthread_handler_t handle_one_connection(
{
NET *net= &thd->net;
+ lex_start(thd);
if (login_connection(thd))
goto end_thread;
diff -Nrup a/sql/sql_lex.cc b/sql/sql_lex.cc
--- a/sql/sql_lex.cc 2007-09-19 17:02:56 +02:00
+++ b/sql/sql_lex.cc 2007-10-14 19:28:28 +02:00
@@ -362,6 +362,7 @@ void lex_start(THD *thd)
lex->server_options.owner= 0;
lex->server_options.port= -1;
+ lex->is_lex_started= TRUE;
DBUG_VOID_RETURN;
}
@@ -2138,7 +2139,7 @@ void Query_tables_list::destroy_query_ta
st_lex::st_lex()
:result(0), yacc_yyss(0), yacc_yyvs(0),
- sql_command(SQLCOM_END), option_type(OPT_DEFAULT)
+ sql_command(SQLCOM_END), option_type(OPT_DEFAULT), is_lex_started(0)
{
my_init_dynamic_array2(&plugins, sizeof(plugin_ref),
diff -Nrup a/sql/sql_lex.h b/sql/sql_lex.h
--- a/sql/sql_lex.h 2007-09-12 21:44:47 +02:00
+++ b/sql/sql_lex.h 2007-10-14 19:28:28 +02:00
@@ -1703,6 +1703,7 @@ typedef struct st_lex : public Query_tab
st_alter_tablespace *alter_tablespace_info;
bool escape_used;
+ bool is_lex_started; /* If lex_start() did run. For debugging. */
st_lex();
diff -Nrup a/sql/sql_plugin.cc b/sql/sql_plugin.cc
--- a/sql/sql_plugin.cc 2007-10-05 02:34:23 +02:00
+++ b/sql/sql_plugin.cc 2007-10-14 19:28:28 +02:00
@@ -1329,6 +1329,7 @@ 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));
diff -Nrup a/sql/sql_servers.cc b/sql/sql_servers.cc
--- a/sql/sql_servers.cc 2007-08-13 15:11:14 +02:00
+++ b/sql/sql_servers.cc 2007-10-14 19:28:28 +02:00
@@ -140,6 +140,7 @@ 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
diff -Nrup a/sql/sql_udf.cc b/sql/sql_udf.cc
--- a/sql/sql_udf.cc 2007-08-13 15:11:14 +02:00
+++ b/sql/sql_udf.cc 2007-10-14 19:28:28 +02:00
@@ -135,6 +135,7 @@ 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));
diff -Nrup a/sql/tztime.cc b/sql/tztime.cc
--- a/sql/tztime.cc 2007-08-13 15:11:14 +02:00
+++ b/sql/tztime.cc 2007-10-14 19:28:28 +02:00
@@ -1575,6 +1575,7 @@ 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 (hash_init(&tz_names, &my_charset_latin1, 20,
| Thread |
|---|
| • bk commit into 5.1 tree (istruewing:1.2572) BUG#31210 | Ingo Struewing | 14 Oct |