Skip to content

Commit

Permalink
[CBRD-25586] Fix the problem that query entries with no result sets a…
Browse files Browse the repository at this point in the history
  • Loading branch information
hgryoo authored Sep 19, 2024
1 parent 00ae940 commit 311d40c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/method/method_invoke_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ namespace cubmethod
if (query_id == NULL_QUERY_ID || query_id >= SHRT_MAX)
{
// false query e.g) SELECT * FROM db_class WHERE 0 <> 0
assert (query_id == NULL_QUERY_ID);
return nullptr;
}

Expand Down
7 changes: 2 additions & 5 deletions src/method/method_query_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,8 @@ namespace cubmethod

if (qres && qres->type == T_SELECT)
{
if (qresult.tuple_count > 0)
{
result_info.query_id = qres->res.s.query_id;
}
else
result_info.query_id = qres->res.s.query_id;
if (result_info.query_id >= SHRT_MAX) // handle invalid value
{
result_info.query_id = NULL_QUERY_ID; // initialized value
}
Expand Down

0 comments on commit 311d40c

Please sign in to comment.