Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
f50e9aad
Commit
f50e9aad
authored
19 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplify parsing of select query.
parent
c53db193
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/sql.y
+21
-36
21 additions, 36 deletions
dlls/msi/sql.y
with
21 additions
and
36 deletions
dlls/msi/sql.y
+
21
−
36
View file @
f50e9aad
...
...
@@ -52,9 +52,6 @@ static LPWSTR SQL_getstring( struct sql_str *str );
static INT SQL_getint( SQL_input *sql );
static int SQL_lex( void *SQL_lval, SQL_input *info);
static MSIVIEW *do_one_select( MSIDATABASE *db, MSIVIEW *in,
string_list *columns );
static BOOL SQL_MarkPrimaryKeys( create_col_info *cols,
string_list *keys);
...
...
@@ -127,7 +124,7 @@ static struct expr * EXPR_wildcard();
%type <string> column table id
%type <column_list> selcollist
%type <query> query from unorderedsel
%type <query> query from unorderedsel
selectfrom
%type <query> oneupdate onedelete oneselect onequery onecreate oneinsert
%type <expr> expr val column_val const_val
%type <column_type> column_type data_type data_type_l data_count
...
...
@@ -340,34 +337,34 @@ oneselect:
;
unorderedsel:
TK_SELECT selcollist from
TK_SELECT selectfrom
{
$$ = $2;
}
| TK_SELECT TK_DISTINCT selectfrom
{
SQL_input* sql = (SQL_input*) info;
if( !$3 )
$$ = NULL;
DISTINCT_CreateView( sql->db, &$$, $3 );
if( !$$ )
YYABORT;
if( $2 )
{
$$ = do_one_select( sql->db, $3, $2 );
if( !$$ )
YYABORT;
}
else
$$ = $3;
}
| TK_SELECT TK_DISTINCT selcollist from
;
selectfrom:
selcollist from
{
SQL_input* sql = (SQL_input*) info;
MSIVIEW *view = $4;
if( !view )
$$ = NULL;
if( $1 )
SELECT_CreateView( sql->db, &$$, $2, $1 );
else
$$ = $2;
if( !$$ )
YYABORT;
if( $3 )
{
view = do_one_select( sql->db, view, $3 );
if( !view )
YYABORT;
}
DISTINCT_CreateView( sql->db, & $$, view );
}
;
...
...
@@ -677,18 +674,6 @@ int SQL_error(const char *str)
return 0;
}
static MSIVIEW *do_one_select( MSIDATABASE *db, MSIVIEW *in,
string_list *columns )
{
MSIVIEW *view = NULL;
SELECT_CreateView( db, &view, in, columns );
delete_string_list( columns );
if( !view )
ERR("Error creating select query\n");
return view;
}
static struct expr * EXPR_wildcard()
{
struct expr *e = HeapAlloc( GetProcessHeap(), 0, sizeof *e );
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment