1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-05 Modify the DDL parser to not use (even more) global variables.

This commit is contained in:
David Hall
2016-08-16 18:25:09 -05:00
parent 53abd78979
commit 0d2f496389
6 changed files with 48 additions and 42 deletions

View File

@ -81,6 +81,14 @@ struct scan_data
valbuf_t valbuf;
};
struct pass_to_bison {
ParseTree* fParseTree;
std::string fDBSchema;
void* scanner;
pass_to_bison(ParseTree* pt) : fParseTree(pt), scanner(NULL) {};
};
class SqlParser
{
public:
@ -113,10 +121,11 @@ public:
protected:
ParseTree fParseTree;
std::string fDBSchema;
int fStatus; ///< return from yyparse() stored here.
bool fDebug; ///< Turn on bison debugging.
void* scanner; // yyscan_t * needed for re-entrant flex scanner
scan_data scanData;
pass_to_bison x;
};