MySQL  8.0.20
Source Code Documentation
check_stack.h File Reference

Go to the source code of this file.


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.

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