From: Peter Rabbitson Date: Tue, 17 Mar 2015 15:21:47 +0000 (+0100) Subject: Fix exception on complex update/delete under a replicated setup X-Git-Tag: v0.082820~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=7f95ea9928d36f9bd41f3c3f45fcb84a62f35577 Fix exception on complex update/delete under a replicated setup THIS COMMIT IS A HACK!!! The actual fix is migration of the logic to the SQLMaker subclass and deal with it there. However the entire class hierarchy is currently in flux, so go with the least invasive change until the storage rewrite settles. (cherry pick of da4a8fe7) --- diff --git a/Changes b/Changes index 238c203..082475a 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ Revision history for DBIx::Class - Protect destructors from rare but possible double execution, and loudly warn the user whenever the problem is encountered (GH#63) - Fix updating multiple CLOB/BLOB columns on Oracle + - Fix exception on complex update/delete under a replicated setup + http://lists.scsys.co.uk/pipermail/dbix-class/2015-January/011903.html - Fix hang in t/72pg.t when run against DBD::Pg 3.5.0. The ping() implementation changes due to RT#100648 made an alarm() based timeout lock-prone. diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 70fd834..6b1181e 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -307,6 +307,7 @@ my $method_dispatch = { _parse_connect_do savepoints _sql_maker_opts + _use_multicolumn_in _conn_pid _dbh_autocommit _native_data_type @@ -363,7 +364,7 @@ my $method_dispatch = { # the capability framework # not sure if CMOP->initialize does evil things to DBIC::S::DBI, fix if a problem grep - { $_ =~ /^ _ (?: use | supports | determine_supports ) _ /x } + { $_ =~ /^ _ (?: use | supports | determine_supports ) _ /x and $_ ne '_use_multicolumn_in' } ( Class::MOP::Class->initialize('DBIx::Class::Storage::DBI')->get_all_method_names ) )], };