From: Peter Rabbitson Date: Thu, 10 Sep 2015 15:56:55 +0000 (+0200) Subject: Trap exact condition of reported, yet undiagnosed IDENTITY_SELECT X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a5fd481cb7ae0489da1474502974d8497d8762e;p=dbsrgits%2FDBIx-Class-Historic.git Trap exact condition of reported, yet undiagnosed IDENTITY_SELECT Something is popagating the _autoinc_supplied_for_op flag where it shouldn't --- diff --git a/lib/DBIx/Class/Storage/DBI/IdentityInsert.pm b/lib/DBIx/Class/Storage/DBI/IdentityInsert.pm index 0ab37d2..8485e86 100644 --- a/lib/DBIx/Class/Storage/DBI/IdentityInsert.pm +++ b/lib/DBIx/Class/Storage/DBI/IdentityInsert.pm @@ -41,6 +41,11 @@ sub _prep_for_execute { my $table = $self->sql_maker->_quote($ident->name); $op = uc $op; + DBIx::Class::Exception->throw( + "Unexpected _autoinc_supplied_for_op flag in callstack - please file a bug including the stacktrace ( @{[ DBIx::Class::_ENV_::HELP_URL() ]} ):\n\n STACKTRACE STARTS", + 'stacktrace' + ) if $op ne 'INSERT' and $op ne 'UPDATE'; + my ($sql, $bind) = $self->next::method(@_); return (<