Commit 63045f16 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

There's no need to sort the subselect

All this does is force mysql to sort (possibly filesort) and we really
don't care about the order when we're going to use it to feed an update
or delete.
parent 3d212688
......@@ -204,6 +204,7 @@ our @Final = (
$txns->Limit( ALIAS => $ocfv_alias, FIELD => 'Content', VALUE => $state );
$txns->Limit( ALIAS => $ocfv_alias, FIELD => 'CustomField', VALUE => $cf->id );
$txns->Columns('id');
$txns->OrderBy;
my $res = $RT::Handle->SimpleUpdateFromSelect(
'Transactions', { $old_new .'Value' => $state }, $txns->BuildSelectQuery
......@@ -231,6 +232,7 @@ our @Final = (
VALUE => 'NULL'
);
$txns->Columns( $old_new .'Reference' );
$txns->OrderBy;
my $res = $RT::Handle->DeleteFromSelect(
'ObjectCustomFieldValues', $txns->BuildSelectQuery
......@@ -269,6 +271,7 @@ our @Final = (
$txns->Limit( FIELD => 'Type', VALUE => 'CustomField' );
$txns->Limit( FIELD => 'Field', VALUE => $cf->id );
$txns->Columns('id');
$txns->OrderBy();
my $res = $RT::Handle->SimpleUpdateFromSelect(
'Transactions',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment