Permalink
Browse files

nathan, this should fix it. thanks for the bug report

git-svn-id: svn://okws.org/okws2/devel/3.1@5733 7d287422-6eea-da11-b677-00123f2a783a
  • Loading branch information...
1 parent fe8063a commit 307e61644d13dc9a83aaa3315e3e0237b1e6c8eb max committed Aug 4, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 ezdb/libezdb/bind.C
View
@@ -12,8 +12,18 @@ namespace ezdb {
{ *_x.amysql_uint64 = i; }
to_xdr_t::to_xdr_t (int64_t i) : _x (AMYSQL_TYPE_INT)
{ *_x.amysql_int = i; }
- to_xdr_t::to_xdr_t (u_int32_t i) : _x (AMYSQL_TYPE_INT)
- { *_x.amysql_int = i; }
+
+ to_xdr_t::to_xdr_t (u_int32_t i)
+ {
+ if (i > u_int32_t (INT32_MAX)) {
+ _x.set_typ (AMYSQL_TYPE_UINT64);
+ *_x.amysql_uint64 = i;
+ } else {
+ _x.set_typ (AMYSQL_TYPE_INT);
+ *_x.amysql_int = i;
+ }
+ }
+
to_xdr_t::to_xdr_t (int32_t i) : _x (AMYSQL_TYPE_INT)
{ *_x.amysql_int = i; }
to_xdr_t::to_xdr_t (u_int16_t i) : _x (AMYSQL_TYPE_INT)

0 comments on commit 307e616

Please sign in to comment.