Skip to content

Commit c23c77a

Browse files
committed
ODBC-447 Crash on FillSchema command in .Net
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.
1 parent 64c7300 commit c23c77a

File tree

3 files changed

+106
-87
lines changed

3 files changed

+106
-87
lines changed

driver/interface/PreparedStatement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ namespace mariadb
203203

204204
int64_t PreparedStatement::getUpdateCount()
205205
{
206-
auto cmdInfo= results->getCmdInformation();
206+
auto cmdInfo= results ? results->getCmdInformation() : nullptr;
207207
if (cmdInfo) {
208208
return cmdInfo->getUpdateCount();
209209
}

0 commit comments

Comments
 (0)