diff options
author | istruewing@stella.local <> | 2007-11-05 16:25:40 +0100 |
---|---|---|
committer | istruewing@stella.local <> | 2007-11-05 16:25:40 +0100 |
commit | 3eaf82a17504158aa29b1f39360f365428943de4 (patch) | |
tree | d8c7de38aaf2b0bbe66f0db7225e675e17f08454 /sql/tztime.cc | |
parent | 5777cc29982b664b653a02d412f1cf6f56bda1b7 (diff) | |
download | mariadb-git-3eaf82a17504158aa29b1f39360f365428943de4.tar.gz |
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".
Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...
Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 9eb38e97827..920f8e87d13 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1575,6 +1575,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) 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, |