~michaeleguo/ubuntu/trusty/percona-xtradb-cluster-5.5/arm64fix

« back to all changes in this revision

Viewing changes to scripts/mysql_fix_extensions.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-10 14:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20140210144423-f2134l2gxuvq2m6l
Tags: upstream-5.5.34-25.9+dfsg
ImportĀ upstreamĀ versionĀ 5.5.34-25.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
# Copyright (c) 2001 MySQL AB, 2009 Sun Microsystems, Inc.
 
4
# Use is subject to license terms.
 
5
#
 
6
# This program is free software; you can redistribute it and/or
 
7
# modify it under the terms of the GNU Library General Public
 
8
# License as published by the Free Software Foundation; version 2
 
9
# of the License.
 
10
#
 
11
# This program is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
# Library General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU Library General Public
 
17
# License along with this library; if not, write to the Free
 
18
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 
19
# MA 02110-1301, USA
 
20
 
 
21
# This is a utility for MySQL. It is not needed by any standard part
 
22
# of MySQL.
 
23
 
 
24
# Usage: mysql_fix_extentions datadir
 
25
# does not work with RAID, with InnoDB or BDB tables
 
26
# makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase
 
27
# useful when datafiles are copied from windows
 
28
 
 
29
die "Usage: $0 datadir\n" unless -d $ARGV[0];
 
30
 
 
31
for $a (<$ARGV[0]/*/*.*>) { $_=$a;
 
32
  s/\.frm$/.frm/i;
 
33
  s/\.(is[md]|my[id])$/\U$&/i;
 
34
  rename ($a, $_) || warn "Cannot rename $a => $_ : $!";
 
35
}