~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to scripts/mysql_fix_extensions.sh

  • Committer: Brian Aker
  • Date: 2008-07-08 21:36:11 UTC
  • mfrom: (77.1.34 codestyle)
  • Revision ID: brian@tangent.org-20080708213611-b0k2zy8eldttqct3
Merging up Monty's changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!@PERL@
2
 
# This is a utility for MySQL. It is not needed by any standard part
3
 
# of MySQL.
4
 
 
5
 
# Usage: mysql_fix_extentions datadir
6
 
# does not work with RAID, with InnoDB or BDB tables
7
 
# makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase
8
 
# useful when datafiles are copied from windows
9
 
 
10
 
die "Usage: $0 datadir\n" unless -d $ARGV[0];
11
 
 
12
 
for $a (<$ARGV[0]/*/*.*>) { $_=$a;
13
 
  s/\.frm$/.frm/i;
14
 
  s/\.(is[md]|my[id])$/\U$&/i;
15
 
  rename ($a, $_) || warn "Cannot rename $a => $_ : $!";
16
 
}