add drop test case in test/queries/queries-good.sql

This commit is contained in:
root 2017-09-29 17:15:18 +08:00
parent bdc9a4b939
commit d220ff47ab
2 changed files with 5 additions and 3 deletions

View File

@ -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 { } <fval> <ival> <uval> <bval> <order_type>
%destructor { free( ($$.name) ); free( ($$.schema) ); } <table_n>
%destructor { free( ($$.name) ); free( ($$.schema) ); } <table_name>
%destructor { free( ($$) ); } <sval>
%destructor {
if (($$) != nullptr) {
@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha
%type <update_stmt> update_statement
%type <drop_stmt> drop_statement
%type <show_stmt> show_statement
%type <table_n> table_name
%type <table_name> table_name
%type <sval> opt_alias alias file_path prepare_target_query
%type <bval> opt_not_exists opt_exists opt_distinct
%type <uval> import_file_type opt_join_type column_type

2
test/queries/queries-good.sql Normal file → Executable file
View File

@ -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, ?);';