Skip to content

Commit

Permalink
fix binding size for MYSQL_TYPE_LONG columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
waterson committed Feb 26, 2009
1 parent 1d2c708 commit 6128df7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion ChangeLog
@@ -1,4 +1,9 @@
2009-02-18 Chris Waterson <waterson@pixazza.com>
2009-02-26 Chris Waterson <waterson@maubi.net>

* HDBC-mysql-0.4. Fix incorrect binding size (should always be 4
bytes, not compiler's "long") for MYSQL_TYPE_LONG columns.

2009-02-18 Chris Waterson <waterson@maubi.net>

* HDBC-mysql-0.3 Deal with some of the problems where statements
would mysteriously "close". It turns out that only one statement
Expand Down
2 changes: 1 addition & 1 deletion Database/HDBC/MySQL/Connection.hsc
Expand Up @@ -516,7 +516,7 @@ cellValue bind = do
nonNullCellValue :: CInt -> Ptr () -> CULong -> IO Types.SqlValue

nonNullCellValue #{const MYSQL_TYPE_LONG} p _ = do
n :: CLong <- peek $ castPtr p
n :: CInt <- peek $ castPtr p
return $ Types.SqlInteger (fromIntegral n)

nonNullCellValue #{const MYSQL_TYPE_LONGLONG} p _ = do
Expand Down
2 changes: 1 addition & 1 deletion HDBC-mysql.cabal
@@ -1,7 +1,7 @@
Name: HDBC-mysql
Category: Database
Synopsis: MySQL driver for HDBC
Version: 0.3
Version: 0.4
Description: This package provides a MySQL driver for HDBC.
Stability: Experimental
Maintainer: Chris Waterson <waterson@maubi.net>
Expand Down

0 comments on commit 6128df7

Please sign in to comment.