From: <br...@us...> - 2004-01-21 20:45:37
|
Update of /cvsroot/htoolkit/HSQL/ODBC In directory sc8-pr-cvs1:/tmp/cvs-serv9207 Modified Files: HSQL.hsc Log Message: Made the minimum buffer size 256 bytes. Since because some databases do not return the right type for columns in the results of catalog functions, we make sure that the buffer is large enough to avoid having to use getLongData for most such result sets. Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/ODBC/HSQL.hsc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** HSQL.hsc 14 Jan 2004 16:17:22 -0000 1.18 --- HSQL.hsc 21 Jan 2004 20:45:34 -0000 1.19 *************** *** 285,289 **** sqlNumResultCols hSTMT ((#ptr FIELD, fieldsCount) pFIELD) >>= handleResult count <- (#peek FIELD, fieldsCount) pFIELD ! (fields, bufSize) <- getFieldDefs hSTMT pFIELD 1 count free pFIELD buffer <- mallocBytes (fromIntegral bufSize) --- 285,294 ---- sqlNumResultCols hSTMT ((#ptr FIELD, fieldsCount) pFIELD) >>= handleResult count <- (#peek FIELD, fieldsCount) pFIELD ! (fields, minSize) <- getFieldDefs hSTMT pFIELD 1 count ! -- because some databases do not return the right type for columns ! -- in the results of catalog functions, we make sure that the buffer ! -- is large enough to avoid having to use getLongData for most ! -- such result sets. ! let bufSize = max minSize 256 free pFIELD buffer <- mallocBytes (fromIntegral bufSize) |