~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2011-02-17 18:06:59 UTC
  • mfrom: (2178.1.3 drizzle-staging)
  • Revision ID: brian@tangent.org-20110217180659-3so1k4syn5m436cj
Merge in all bison updates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
using namespace std;
65
65
 
66
 
extern int DRIZZLEparse(void *session); // from sql_yacc.cc
 
66
extern int base_sql_parse(drizzled::Session *session); // from sql_yacc.cc
67
67
 
68
68
namespace drizzled
69
69
{
70
70
 
71
71
/* Prototypes */
72
 
bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
 
72
bool my_yyoverflow(short **a, ParserType **b, ulong *yystacksize);
73
73
static bool parse_sql(Session *session, Lex_input_stream *lip);
74
74
void parse(Session *session, const char *inBuf, uint32_t length);
75
75
 
594
594
#define MY_YACC_INIT 1000                       // Start with big alloc
595
595
#define MY_YACC_MAX  32000                      // Because of 'short'
596
596
 
597
 
bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize)
 
597
bool my_yyoverflow(short **yyss, ParserType **yyvs, ulong *yystacksize)
598
598
{
599
599
  LEX   *lex= current_session->lex;
600
600
  ulong old_info=0;
619
619
    memcpy(lex->yacc_yyvs, *yyvs, old_info*sizeof(**yyvs));
620
620
  }
621
621
  *yyss=(short*) lex->yacc_yyss;
622
 
  *yyvs=(YYSTYPE*) lex->yacc_yyvs;
 
622
  *yyvs=(ParserType*) lex->yacc_yyvs;
623
623
  return 0;
624
624
}
625
625
 
1706
1706
 
1707
1707
  /* Parse the query. */
1708
1708
 
1709
 
  bool parse_status= DRIZZLEparse(session) != 0;
 
1709
  bool parse_status= base_sql_parse(session) != 0;
1710
1710
 
1711
1711
  /* Check that if DRIZZLEparse() failed, session->is_error() is set. */
1712
1712