2017-03-28 13:22:32 +02:00
|
|
|
#!@PERL_PATH@
|
2010-12-28 19:57:23 +01:00
|
|
|
|
2017-03-28 13:22:32 +02:00
|
|
|
# Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
|
2010-12-28 19:57:23 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Library General Public
|
|
|
|
# License as published by the Free Software Foundation; version 2
|
|
|
|
# of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this library; if not, write to the Free
|
2011-06-30 17:31:31 +02:00
|
|
|
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
2019-05-11 20:29:06 +02:00
|
|
|
# MA 02110-1335 USA
|
2010-12-28 19:57:23 +01:00
|
|
|
|
2014-08-03 14:12:53 +02:00
|
|
|
# This is a utility for MariaDB. It is not needed by any standard part
|
|
|
|
# of MariaDB.
|
2001-12-19 17:15:31 +01:00
|
|
|
|
2014-08-03 14:12:53 +02:00
|
|
|
# Usage: mysql_fix_extensions datadir
|
2001-12-19 17:15:31 +01:00
|
|
|
# does not work with RAID, with InnoDB or BDB tables
|
|
|
|
# makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase
|
|
|
|
# useful when datafiles are copied from windows
|
|
|
|
|
|
|
|
die "Usage: $0 datadir\n" unless -d $ARGV[0];
|
|
|
|
|
|
|
|
for $a (<$ARGV[0]/*/*.*>) { $_=$a;
|
|
|
|
s/\.frm$/.frm/i;
|
2001-12-24 15:55:47 +01:00
|
|
|
s/\.(is[md]|my[id])$/\U$&/i;
|
2001-12-19 17:15:31 +01:00
|
|
|
rename ($a, $_) || warn "Cannot rename $a => $_ : $!";
|
|
|
|
}
|