summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-11-03 14:20:13 +0300
committerkonstantin@mysql.com <>2005-11-03 14:20:13 +0300
commit7e3f757f2deb08b4f2adb1b4cdd1a764d9678129 (patch)
tree639d3dad03adaaad1f20eb9859a38a80c26f6b13 /sql/table.cc
parent69d985cc9d251c5bc16c8f06691b67bef52a35e0 (diff)
downloadmariadb-git-7e3f757f2deb08b4f2adb1b4cdd1a764d9678129.tar.gz
A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary table is created for a cursor, it's created in its memory root, not the memory root of the current query.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index dd6018b70f3..1acf49bc03e 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -338,7 +338,8 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
my_free(buff, MYF(0));
}
/* Allocate handler */
- if (!(outparam->file= get_new_handler(outparam, share->db_type)))
+ if (!(outparam->file= get_new_handler(outparam, &outparam->mem_root,
+ share->db_type)))
goto err;
error=4;