#At file:///opt/local/work/mysql-6.0-bugteam/
2821 Konstantin Osipov 2008-09-03
Fix a valgrind test suite failure on blade13 (pb-valgrind host).
The test case for Bug#31048 runs out of stack there in --ps-protocol.
This is a 64 bit host, and we need a lot of stack there.
modified:
sql/handler.cc
per-file messages:
sql/handler.cc
Check for stack overrun before involving handler::clone().
Fixes another manifestation of Bug#31048 on 64-bit systems.
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2008-08-22 11:16:08 +0000
+++ b/sql/handler.cc 2008-09-03 14:40:19 +0000
@@ -4262,6 +4262,13 @@ int DsMrr_impl::dsmrr_init(handler *h, K
/* Create a separate handler object to do rndpos() calls. */
THD *thd= current_thd;
+
+ /*
+ ::clone() takes up a lot of stack, especially on 64 bit platforms.
+ The constant 5 is an empiric result.
+ */
+ if (check_stack_overrun(thd, 5*STACK_MIN_SIZE, (uchar*) &new_h2))
+ DBUG_RETURN(1);
if (!(new_h2= h->clone(thd->mem_root)) ||
new_h2->ha_external_lock(thd, F_RDLCK))
{
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (konstantin:2821) Bug#31048 | Konstantin Osipov | 3 Sep |