diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 3cd7ed8..7d280a9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -109,7 +109,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - hsql::TableName table_n; + hsql::TableName table_name; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -134,7 +134,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha ** Descrutor symbols *********************************/ %destructor { } -%destructor { free( ($$.name) ); free( ($$.schema) ); } +%destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { if (($$) != nullptr) { @@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type update_statement %type drop_statement %type show_statement -%type table_name +%type table_name %type opt_alias alias file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct %type import_file_type opt_join_type column_type diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql old mode 100644 new mode 100755 index ec0d431..0c24d87 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -39,6 +39,8 @@ UPDATE students SET grade = 1.3, name='Felix Fürstenberg' WHERE name = 'Max Mus UPDATE students SET grade = 1.0; # DROP DROP TABLE students; +DROP TABLE IF EXISTS students; +DROP VIEW IF EXISTS students; # PREPARE PREPARE prep_inst FROM 'INSERT INTO test VALUES (?, ?, ?)'; PREPARE prep2 FROM 'INSERT INTO test VALUES (?, 0, 0); INSERT INTO test VALUES (0, ?, 0); INSERT INTO test VALUES (0, 0, ?);';