Fix error in bind_param for target to source.
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 24 Aug 2010 17:36:41 +0000 (13:36 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 24 Aug 2010 17:36:41 +0000 (13:36 -0400)
Bucardo.pm

index d98d1aa3f71c0b2014ff1760a59f32340e8fd74b..b7b65d3aae5f399cd25cc40a69ee5796532d336c 100644 (file)
@@ -4019,7 +4019,7 @@ sub start_kid {
                     for (@{$g->{binarycols}}) {
                         $sth{target}{$g}{insertrow}->bind_param($_ + $g->{pkcols}, undef, {pg_type => DBD::Pg::PG_BYTEA});
                         $sth{target}{$g}{updaterow}->bind_param($_, undef, {pg_type => DBD::Pg::PG_BYTEA});
-                        $sth{source}{$g}{insertrow}->bind_param($_+1, undef, {pg_type => DBD::Pg::PG_BYTEA});
+                        $sth{source}{$g}{insertrow}->bind_param($_ + $g->{pkcols}, undef, {pg_type => DBD::Pg::PG_BYTEA});
                         $sth{source}{$g}{updaterow}->bind_param($_, undef, {pg_type => DBD::Pg::PG_BYTEA});
                     }
                 }