Skip to content

Commit

Permalink
ODBC-447 Crash on FillSchema command in .Net
Browse files Browse the repository at this point in the history
Somehow .Net in that case sends SQLMoreResults w/out actually executing
the statement. That comes unexpected for the driver and it crashes. It
looks like good case for DM to return "HY010 Function sequence error",
but it does not, and specs doesn't list it for this error. So,
SQL_NO_DATA_FOUND must be and no crash for sure.
  • Loading branch information
lawrinn committed Dec 10, 2024
1 parent 64c7300 commit c23c77a
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 87 deletions.
2 changes: 1 addition & 1 deletion driver/interface/PreparedStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ namespace mariadb

int64_t PreparedStatement::getUpdateCount()
{
auto cmdInfo= results->getCmdInformation();
auto cmdInfo= results ? results->getCmdInformation() : nullptr;
if (cmdInfo) {
return cmdInfo->getUpdateCount();
}
Expand Down
Loading

0 comments on commit c23c77a

Please sign in to comment.