From ddb73e8d567cd78ccd4a94a9addbac7e95d12ab5 Mon Sep 17 00:00:00 2001 From: Pedro Cardoso Date: Tue, 5 Jul 2016 17:38:15 +0100 Subject: [PATCH] Fixed Double input binding --- Sources/MySQL/Bind.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/MySQL/Bind.swift b/Sources/MySQL/Bind.swift index 62e6d63e..0a69e4d0 100644 --- a/Sources/MySQL/Bind.swift +++ b/Sources/MySQL/Bind.swift @@ -5,9 +5,9 @@ #endif /** - This structure is used both for statement input (data values sent to the server) + This structure is used both for statement input (data values sent to the server) and output (result values returned from the server): - + The Swift version consists of a wrapper around MySQL's implementation to ensure proper freeing of allocated memory. */ @@ -98,7 +98,7 @@ public final class Bind { let buffer = UnsafeMutablePointer(allocatingCapacity: 1) buffer.initialize(with: Double(int)) - self.init(type: MYSQL_TYPE_LONGLONG, buffer: buffer, bufferLength: sizeof(Double.self)) + self.init(type: MYSQL_TYPE_DOUBLE, buffer: buffer, bufferLength: sizeof(Double.self)) } /**