mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
MySQL: Take mysql_affected_rows returning -1 into account (was not a SELECT statement)
This commit is contained in:
parent
7354622810
commit
453946edcf
@ -118,7 +118,9 @@ void StatementExecutor::execute()
|
|||||||
|
|
||||||
_state = STMT_EXECUTED;
|
_state = STMT_EXECUTED;
|
||||||
|
|
||||||
_affectedRowCount = mysql_affected_rows(_pSessionHandle);
|
my_ulonglong affectedRows = mysql_affected_rows(_pSessionHandle);
|
||||||
|
if (affectedRows != ((my_ulonglong) - 1))
|
||||||
|
_affectedRowCount = affectedRows; //Was really a DELETE, UPDATE or INSERT statement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user