summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authormattiasj@mattiasj-laptop.(none) <>2007-11-12 21:09:48 +0100
committermattiasj@mattiasj-laptop.(none) <>2007-11-12 21:09:48 +0100
commit32d7dd8679401a341de883aa7d2acdbc80ab6a6a (patch)
treee45fd7d0c5fc62764cf02dce0038b6571c4fa001 /sql/sql_insert.cc
parente4e8cb3a900257e13faede7453391aa962de1650 (diff)
parentc22c91ecde29c7d7e4a8536c174d52eaef3ba9ce (diff)
downloadmariadb-git-32d7dd8679401a341de883aa7d2acdbc80ab6a6a.tar.gz
Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-main
into mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d3010e4309b..11e70a2e5da 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2267,7 +2267,12 @@ pthread_handler_t handle_delayed_insert(void *arg)
goto err;
}
- /* open table */
+ /*
+ Open table requires an initialized lex in case the table is
+ partitioned. The .frm file contains a partial SQL string which is
+ parsed using a lex, that depends on initialized thd->lex.
+ */
+ lex_start(thd);
if (!(di->table=open_ltable(thd, &di->table_list, TL_WRITE_DELAYED, 0)))
{
thd->fatal_error(); // Abort waiting inserts