MySQL  8.0.18
Source Code Documentation
check_stack.h File Reference

Go to the source code of this file.

Functions

bool check_stack_overrun (const THD *thd, long margin, unsigned char *dummy)
 Check stack for a overrun. More...
 

Function Documentation

◆ check_stack_overrun()

bool check_stack_overrun ( const THD thd,
long  margin,
unsigned char *  buf 
)

Check stack for a overrun.

Parameters
thdThread handler.
marginMinimal acceptable unused space in the stack.
bufSee a note below.
Returns
false if success, true if error (reported).
Note
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.