fix DBI binding for negative integers, shoudl fix CCH update, RT#14243
authorivan <ivan>
Thu, 29 Sep 2011 05:53:56 +0000 (05:53 +0000)
committerivan <ivan>
Thu, 29 Sep 2011 05:53:56 +0000 (05:53 +0000)
FS/FS/Record.pm

index 5d3d86a..bccc8e6 100644 (file)
@@ -273,7 +273,7 @@ sub _bind_type {
 
   my $bind_type = { TYPE => SQL_VARCHAR };
 
-  if ( $type =~ /(big)?(int|serial)/i && $value =~ /^\d+(\.\d+)?$/ ) {
+  if ( $type =~ /(big)?(int|serial)/i && $value =~ /^-?\d+(\.\d+)?$/ ) {
 
     $bind_type = { TYPE => SQL_INTEGER };