Skip to content

Commit

Permalink
fix bug: HAVING field check
Browse files Browse the repository at this point in the history
  • Loading branch information
etern committed Aug 10, 2018
1 parent 1f1fc1d commit f158e87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tests/
TAGS
edeProject.el
core
.cquery_cached_index/

# gtags file
GTAGS
Expand Down
3 changes: 3 additions & 0 deletions plugins/shard/sharding-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,9 @@ select_check_HAVING_column(sql_select_t *select)
gboolean found = FALSE; /* found having cond in columns */
int num_aggregate = 0;
const char *having_func = having->left->token_text;
if (!having_func) {
return FALSE;
}
sql_expr_list_t *columns = select->columns;
int i;
for (i = 0; columns && i < columns->len; ++i) {
Expand Down

0 comments on commit f158e87

Please sign in to comment.