Hi Neil,

On Wed, 2002-02-20 at 20:51, Neil Freeman wrote:
> I am using MySQL v3.23.40 on Windows NT. When creating various MyISAM
> tables the files saved are of the form *.frm *.MYD and *.MYI. So far so
> good. When I copy these files over to a Linux box though some of the
> *.MYD and *.MYI extensions appear as lowercase *.myd and *.myi
> 
> This causes MySQL on Linux to complain as it looking for the uppercase
> versions of the files. Does anyone know how I can get around this, or
> even better, why the case appears to change?

Depending on your version, you will find mysql_fix_extensions.sh in the
scripts/ directory. I'll post it below just in case, it's pretty short.
It's just useful because it's a pain to rename this stuff by hand ;-)


[snip]

#!@PERL@
# This is a utility for MySQL. It is not needed by any standard part
# of MySQL.

# Usage: mysql_fix_extentions datadir
# 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;
  s/\.(is[md]|my[id])$/\U$&/i;
  rename ($a, $_) || warn "Cannot rename $a => $_ : $!";
}

[end snip]


Regards,
Arjen.

-- 
Get MySQL Training Worldwide, http://www.mysql.com/training/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Arjen G. Lentz <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Technical Writer, Trainer
/_/  /_/\_, /___/\___\_\___/   Brisbane, QLD Australia
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to