Updated the fles in /lib to use the new VersionParser

This commit is contained in:
Brian Fraser
2012-07-11 15:10:33 -03:00
parent acd5281e3c
commit f30c50be44
5 changed files with 17 additions and 36 deletions

View File

@@ -27,8 +27,7 @@
#
# And some subs have an optional $opts param which is a hashref of options.
# $opts->{mysql_version} is typically used, which is the return value from
# VersionParser::parser() (which returns a zero-padded MySQL version,
# e.g. 004001000 for 4.1.0).
# VersionParser->new()
package TableParser;
use strict;
@@ -421,7 +420,7 @@ sub get_keys {
my ( $type, $cols ) = $key =~ m/(?:USING (\w+))? \((.+)\)/;
my ( $special ) = $key =~ m/(FULLTEXT|SPATIAL)/;
$type = $type || $special || 'BTREE';
if ( $opts->{mysql_version} && $opts->{mysql_version} lt '004001000'
if ( $opts->{mysql_version} && $opts->{mysql_version} lt '4.1'
&& $engine =~ m/HEAP|MEMORY/i )
{
$type = 'HASH'; # MySQL pre-4.1 supports only HASH indexes on HEAP