[Mysql-cocoa-commits] CVS: SMySQL MCPResult.m,1.3,1.4
Brought to you by:
sergecohen
From: Serge C. <ser...@us...> - 2003-08-22 03:11:19
|
Update of /cvsroot/mysql-cocoa/SMySQL In directory sc8-pr-cvs1:/tmp/cvs-serv6792 Modified Files: MCPResult.m Log Message: Corrected the issue (raised by Lorenz Textor) on BigInt MySQL type (corresponding to long long, not long int), where a BIGINT would be passed back as a 32 bits integer instead of 64 bits. Now MCPResult handles properly BIGINT. Added a BIGINT column in the test1 table (CLI_Test), to check if it is working. NB : Unsigned int (both INT and BIGINT) might still causes problem if they are in the higher half of their range (because they will be interpreted as signed integers). 2003-08-21; Serge Cohen. Index: MCPResult.m =================================================================== RCS file: /cvsroot/mysql-cocoa/SMySQL/MCPResult.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MCPResult.m 16 Jan 2003 12:18:23 -0000 1.3 --- MCPResult.m 21 Aug 2003 06:30:52 -0000 1.4 *************** *** 258,261 **** --- 258,262 ---- else { char *theData = calloc(sizeof(char),theLengths[i]+1); + char *theUselLess; memcpy(theData, theRow[i],theLengths[i]); theData[theLengths[i]] = '\0'; *************** *** 264,271 **** case FIELD_TYPE_TINY: case FIELD_TYPE_SHORT: - case FIELD_TYPE_LONG: case FIELD_TYPE_INT24: case FIELD_TYPE_LONGLONG: ! theCurrentObj = [NSNumber numberWithLong:atol(theData)]; break; case FIELD_TYPE_DECIMAL: --- 265,274 ---- case FIELD_TYPE_TINY: case FIELD_TYPE_SHORT: case FIELD_TYPE_INT24: + case FIELD_TYPE_LONG: + theCurrentObj = [NSNumber numberWithLong:atol(theData)]; + break; case FIELD_TYPE_LONGLONG: ! theCurrentObj = [NSNumber numberWithLongLong:strtoq(theData, &theUselLess, 0)]; break; case FIELD_TYPE_DECIMAL: |