~hingo/percona-toolkit/pqd-mongodb-24

« back to all changes in this revision

Viewing changes to bin/pt-query-advisor

  • Committer: Brian Fraser
  • Date: 2012-07-20 20:25:10 UTC
  • mfrom: (303.2.27 new-versionparser)
  • Revision ID: brian.fraser@percona.com-20120720202510-zoia5ndqchpcysec
Merged new-versionparser

Show diffs side-by-side

added added

removed removed

Lines of Context:
5505
5505
      my ( $type, $cols ) = $key =~ m/(?:USING (\w+))? \((.+)\)/;
5506
5506
      my ( $special ) = $key =~ m/(FULLTEXT|SPATIAL)/;
5507
5507
      $type = $type || $special || 'BTREE';
5508
 
      if ( $opts->{mysql_version} && $opts->{mysql_version} lt '004001000'
5509
 
         && $engine =~ m/HEAP|MEMORY/i )
5510
 
      {
5511
 
         $type = 'HASH'; # MySQL pre-4.1 supports only HASH indexes on HEAP
5512
 
      }
5513
 
 
5514
5508
      my ($name) = $key =~ m/(PRIMARY|`[^`]*`)/;
5515
5509
      my $unique = $key =~ m/PRIMARY|UNIQUE/ ? 1 : 0;
5516
5510
      my @cols;