aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-03-07 21:50:48 +0000
committerBibiko <bibiko@eva.mpg.de>2011-03-07 21:50:48 +0000
commite75d3525ec27bef7b8b1ada2b05a6a9c2d0d7ac9 (patch)
tree133122d46a1d06d073c5817b5df9e47b42619f2c /Source
parent4813a46d6a72d78aeeac5e64ada0bd8ce83d0bb4 (diff)
downloadsequelpro-e75d3525ec27bef7b8b1ada2b05a6a9c2d0d7ac9.tar.gz
sequelpro-e75d3525ec27bef7b8b1ada2b05a6a9c2d0d7ac9.tar.bz2
sequelpro-e75d3525ec27bef7b8b1ada2b05a6a9c2d0d7ac9.zip
• fixed i995 : affected rows returned -1
- due to http://dev.mysql.com/doc/refman/5.1/en/mysql-affected-rows.html mysql_affected_rows() normally returns a my_ulonglong BUT it can return -1; thus we have to check whether it is >= 0 via [mySQLConnection affectedRows] != (my_ulonglong)~0
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCustomQuery.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 7228baa3..2c9e890e 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -635,7 +635,7 @@
}
// Record any affected rows
- if ( [mySQLConnection affectedRows] >= (my_ulonglong)0 )
+ if ( [mySQLConnection affectedRows] != (my_ulonglong)~0 )
totalAffectedRows += (NSUInteger)[mySQLConnection affectedRows];
else if ( [streamingResult numOfRows] )
totalAffectedRows += (NSUInteger)[streamingResult numOfRows];