• Vadim Zeitlin's avatar
    Return -1 from get_affected_rows() in ODBC backend if unknown · e7e7fb78
    Vadim Zeitlin authored
    It is not always possible to get the number of affected rows after a
    partially executed statement, some drivers provide this information, but
    some others, notable MS SQL native client one, do not.
    
    Return -1 from get_affected_rows() to at least allow distinguishing this
    situation from the one in which we can really know that no rows were
    affected, in which case 0 would be returned.
    
    Notice that this indirectly fixes the "Get affected rows" unit test
    which was broken by the previous fix of #495 as it made the partial
    insert actually work, while it was completely broken before because
    "1\0" string couldn't be converted to a number and so the check for
    get_affected_rows() wasn't being executed at all. But now that the
    string is the correct "1", the check started being executed and failing.
    e7e7fb78
Name
Last commit
Last update
bin Loading commit data...
cmake Loading commit data...
docs Loading commit data...
include Loading commit data...
languages/ada Loading commit data...
src Loading commit data...
tests Loading commit data...
www Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CHANGES Loading commit data...
CMakeLists.txt Loading commit data...
CTestConfig.cmake Loading commit data...
LICENSE_1_0.txt Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
Vagrantfile Loading commit data...
appveyor.yml Loading commit data...
valgrind.suppress Loading commit data...