1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Post-review fixes of BUG#9937: Crash on call to stored procedure.

This commit is contained in:
pem@mysql.comhem.se
2005-05-31 12:06:15 +02:00
parent e496b24304
commit 063896a6e7
8 changed files with 30 additions and 13 deletions

View File

@ -4986,7 +4986,14 @@ long max_stack_used;
#endif
#ifndef EMBEDDED_LIBRARY
bool check_stack_overrun(THD *thd, long margin)
/*
Note: The 'buf' parameter is necessary, even if it is unused here.
- fix_fields functions has a "dummy" buffer large enough for the
corresponding exec. (Thus we only have to check in fix_fields.)
- Passing to check_stack_overrun() prevents the compiler from removing it.
*/
bool check_stack_overrun(THD *thd, long margin,
char *buf __attribute__((unused)))
{
long stack_used;
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=