~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/randgen/lib/GenTest/Transform/RemoveIndexHints.pm

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package GenTest::Transform::RemoveIndexHints;
 
2
 
 
3
require Exporter;
 
4
@ISA = qw(GenTest GenTest::Transform);
 
5
 
 
6
use strict;
 
7
use lib 'lib';
 
8
 
 
9
use GenTest;
 
10
use GenTest::Transform;
 
11
use GenTest::Constants;
 
12
 
 
13
sub transform {
 
14
        my ($class, $orig_query) = @_;
 
15
 
 
16
        if ($orig_query !~ m{(FORCE|IGNORE|USE)\s*KEY}sio) {
 
17
                return STATUS_WONT_HANDLE;
 
18
        } else {
 
19
                $orig_query =~ s{(FORCE|IGNORE|USE)\s+KEY\s*\(.*?\)}{}sio;
 
20
                return $orig_query." /* TRANSFORM_OUTCOME_UNORDERED_MATCH */";
 
21
        }
 
22
}
 
23
 
 
24
1;