Fix MS SQL int conversion, fix #282.

This is a blind fix that I hope is the one needed, wherein -1 get sent
to unsigned-to-sign which fails to handle it as expected. The protocol
and driver are then sending unsigned ints and that's what we now handle
in the CFFI layer.

This allows to push the attempt to ease testing of it, and allows me
also to cut a release without modified files handling around.
This commit is contained in:
Dimitri Fontaine 2015-09-06 21:11:14 +02:00
parent fce44a3f49
commit 87698cf114

View File

@ -83,9 +83,9 @@
((:syb-varchar :syb-text) (foreign-string-to-lisp data :count len))
(:syb-char (string-trim #(#\Space) (foreign-string-to-lisp data :count len)))
((:syb-bit :syb-bitn) (mem-ref data :int))
(:syb-int1 (unsigned-to-signed (mem-ref data :int) 1))
(:syb-int2 (unsigned-to-signed (mem-ref data :int) 2))
(:syb-int4 (unsigned-to-signed (mem-ref data :int) 4))
(:syb-int1 (unsigned-to-signed (mem-ref data :unsigned-int) 1))
(:syb-int2 (unsigned-to-signed (mem-ref data :unsigned-int) 2))
(:syb-int4 (unsigned-to-signed (mem-ref data :unsigned-int) 4))
(:syb-int8 (mem-ref data :int8))
(:syb-flt8 (mem-ref data :double))
(:syb-datetime