David White writes:
> I have a problem with some data disappearing after a CREATE INDEX
> statement.  Here's the sequence of events:
> 
> 1.  I have the tables MASTER_ACCOUNT, MASTER_EMAIL, MASTER_GROUP,
> MASTER_INDIVIDUAL, TMP_PHONE_DAY, TMP_PHONE_FAX, and TMP_PHONE_NIGHT.
> All of these are populated with lots of data, between 20,000 and 250,000
> rows each.  There are other tables in the database, but these are the only
> ones that I'm interested in here.
> 
> 2.  I run a Perl script.  It uses DBI (1.14) to access the
> database.  It contains the lines:
> 
> $dbh->do("CREATE INDEX ma ON $DB_SOURCE.MASTER_ACCOUNT(RACCOUNT)");
> $dbh->do("CREATE INDEX mi ON $DB_SOURCE.MASTER_INDIVIDUAL(RACCOUNT)");
> $dbh->do("CREATE INDEX mg ON $DB_SOURCE.MASTER_GROUP(RACCOUNT)");
> $dbh->do("CREATE INDEX me ON $DB_SOURCE.MASTER_EMAIL(RACCOUNT)");
> $dbh->do("CREATE INDEX pd ON $DB_SOURCE.TMP_PHONE_DAY(RACCOUNT)");
> $dbh->do("CREATE INDEX pn ON $DB_SOURCE.TMP_PHONE_NIGHT(RACCOUNT)");
> $dbh->do("CREATE INDEX pf ON $DB_SOURCE.TMP_PHONE_FAX(RACCOUNT)");
> 
> So far, everything is ok.  The tables have all of their data, and are
> indexed.
> 
> 3.  Later, I run the script again.  (None of the data has changed in
> the interim.)  This will try to create duplicate indices, which is a
> mistake that I hadn't thought about.  I don't get any warning about
> duplicate indices.  Further, all of the data gets erased from the
> tables!  It looks like:
> 
> -rw-rw----    1 mysql    mysql        9674 Aug  3 09:45 MASTER_ACCOUNT.frm
> -rw-rw----    1 mysql    mysql           0 Aug  3 09:45 MASTER_ACCOUNT.MYD
> -rw-rw----    1 mysql    mysql        1024 Aug  3 09:45 MASTER_ACCOUNT.MYI
> -rw-rw----    1 mysql    mysql        8686 Aug  3 09:45 MASTER_EMAIL.frm
> -rw-rw----    1 mysql    mysql           0 Aug  3 09:45 MASTER_EMAIL.MYD
> -rw-rw----    1 mysql    mysql        1024 Aug  3 09:45 MASTER_EMAIL.MYI
> -rw-rw----    1 mysql    mysql        8772 Aug  3 09:45 MASTER_GROUP.frm
> -rw-rw----    1 mysql    mysql           0 Aug  3 09:45 MASTER_GROUP.MYD
> -rw-rw----    1 mysql    mysql        1024 Aug  3 09:45 MASTER_GROUP.MYI
> ... and so forth for all of the tables mentioned. 

Hi!

This should not have happened !!

Please try our latest 3.23.40 binary and see if there is anyway you
can reproduce the problem. 

If you can reproduce it with our binaries (and your settings are all
OK), we would like to take a closer look at your tables.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   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