From: <kr_...@us...> - 2005-12-12 20:59:34
|
Update of /cvsroot/htoolkit/HSQL/MySQL/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24423/Database/HSQL Modified Files: HsMySQL.h MySQL.hsc Log Message: Some fixes: - CLIENT_MULTI_STATEMENTS isn't available for all versions and it is made optional - In HsMySQL.h mingw32_HOST_OS is used instead of _WIN32_ - fromNotNullSqlCStringLen is replaced with fromSqlCStringLen Index: HsMySQL.h =================================================================== RCS file: /cvsroot/htoolkit/HSQL/MySQL/Database/HSQL/HsMySQL.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HsMySQL.h 17 Jun 2005 08:43:51 -0000 1.1 --- HsMySQL.h 12 Dec 2005 20:59:24 -0000 1.2 *************** *** 2,6 **** #define HsMySQL ! #if defined(_WIN32_) #include <windows.h> #endif --- 2,6 ---- #define HsMySQL ! #ifdef mingw32_HOST_OS #include <windows.h> #endif *************** *** 8,10 **** --- 8,16 ---- #include <mysql.h> + #ifdef CLIENT_MULTI_STATEMENTS + #define MYSQL_DEFAULT_CONNECT_FLAGS CLIENT_MULTI_STATEMENTS + #else + #define MYSQL_DEFAULT_CONNECT_FLAGS 0 + #endif + #endif Index: MySQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/MySQL/Database/HSQL/MySQL.hsc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MySQL.hsc 12 Dec 2005 15:21:56 -0000 1.2 --- MySQL.hsc 12 Dec 2005 20:59:24 -0000 1.3 *************** *** 12,17 **** ----------------------------------------------------------------------------------------- - #include <config.h> - module Database.HSQL.MySQL(connect, module Database.HSQL) where --- 12,15 ---- *************** *** 88,92 **** pUser <- newCString user pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr (#const CLIENT_MULTI_STATEMENTS) free pServer free pDatabase --- 86,90 ---- pUser <- newCString user pAuthentication <- newCString authentication ! res <- mysql_real_connect pMYSQL pServer pUser pAuthentication pDatabase 0 nullPtr (#const MYSQL_DEFAULT_CONNECT_FLAGS) free pServer free pDatabase *************** *** 216,220 **** -- Tables_in_xx 0 VARCHAR collectRows (\stmt -> do ! mb_v <- stmtGetCol stmt 0 ("Tables", SqlVarChar 0, False) fromNonNullSqlCStringLen return (case mb_v of { Nothing -> ""; Just a -> a })) stmt --- 214,218 ---- -- Tables_in_xx 0 VARCHAR collectRows (\stmt -> do ! mb_v <- stmtGetCol stmt 0 ("Tables", SqlVarChar 0, False) fromSqlCStringLen return (case mb_v of { Nothing -> ""; Just a -> a })) stmt |