30
30
#include <drizzled/show.h>
31
31
#include <drizzled/rename.h>
32
32
#include <drizzled/functions/time/unix_timestamp.h>
33
#include <drizzled/functions/get_system_var.h>
33
34
#include <drizzled/item/cmpfunc.h>
34
35
#include <drizzled/session.h>
35
36
#include <drizzled/sql_load.h>
36
/* API for connecting, logging in to a drizzled server */
37
37
#include <drizzled/connect.h>
38
#include <drizzled/lock.h>
40
41
using namespace std;
2389
/****************************************************************************
2390
Check stack size; Send error if there isn't enough stack to continue
2391
****************************************************************************/
2392
#if STACK_DIRECTION < 0
2393
#define used_stack(A,B) (long) (A - B)
2395
#define used_stack(A,B) (long) (B - A)
2400
Note: The 'buf' parameter is necessary, even if it is unused here.
2401
- fix_fields functions has a "dummy" buffer large enough for the
2402
corresponding exec. (Thus we only have to check in fix_fields.)
2403
- Passing to check_stack_overrun() prevents the compiler from removing it.
2405
bool check_stack_overrun(Session *session, long margin, unsigned char *)
2408
assert(session == current_session);
2409
if ((stack_used=used_stack(session->thread_stack,(char*) &stack_used)) >=
2410
(long) (my_thread_stack_size - margin))
2412
sprintf(errbuff[0],ER(ER_STACK_OVERRUN_NEED_MORE),
2413
stack_used,my_thread_stack_size,margin);
2414
my_message(ER_STACK_OVERRUN_NEED_MORE,errbuff[0],MYF(ME_FATALERROR));
2420
2391
#define MY_YACC_INIT 1000 // Start with big alloc
2421
2392
#define MY_YACC_MAX 32000 // Because of 'short'