From e75d3525ec27bef7b8b1ada2b05a6a9c2d0d7ac9 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 7 Mar 2011 21:50:48 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20i995=20:=20affected=20rows=20return?= =?UTF-8?q?ed=20-1=20-=20due=20to=20http://dev.mysql.com/doc/refman/5.1/en?= =?UTF-8?q?/mysql-affected-rows.html=20mysql=5Faffected=5Frows()=20normall?= =?UTF-8?q?y=20returns=20a=20my=5Fulonglong=20BUT=20it=20can=20return=20-1?= =?UTF-8?q?;=20thus=20we=20have=20to=20check=20whether=20it=20is=20>=3D=20?= =?UTF-8?q?0=20via=20[mySQLConnection=20affectedRows]=20!=3D=20(my=5Fulong?= =?UTF-8?q?long)~0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPCustomQuery.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- cgit v1.2.3