List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:January 18 2005 8:06am
Subject:Re: lost data
View as plain text  
Hello.

> I've run a safe recover on a table after I had to recreate the index file:

If you had to recreate the index file after upgrading, this could be a
character set issue. I mean that data is ok, but you see it after converting
to another character set. myisamchk in this case doesn't have any relation to
the problem. Give us the information about version of MySQL and operating 
system.




"J S" <vervoom@stripped> wrote:
> Hi,
> 
> I've run a safe recover on a table after I had to recreate the index file:
> 
> # myisamchk --tmpdir=/proxydb/mysql/tmp --safe-recover internet_usage
> - recovering (with keycache) MyISAM-table 'internet_usage'
> Data records: 290804216
> Data records: 519541696
> #
> 
> After that I ran a query on the table, but the data seems to be corrupted. I 
> tried flushing the tables but still got bad data despite the checks below 
> which show everything looks fine:
> 
> mysql> check table internet_usage;
> +---------------------------+-------+----------+----------+
> | Table                     | Op    | Msg_type | Msg_text |
> +---------------------------+-------+----------+----------+
> | proxy_logs.internet_usage | check | status   | OK       |
> +---------------------------+-------+----------+----------+
> 1 row in set (35 min 34.97 sec)
> 
> # myisamchk internet_usage
> Checking MyISAM file: internet_usage
> Data records: 519541696   Deleted blocks:       0
> - check file-size
> - check record delete-chain
> - check key delete-chain
> - check index reference
> - check data record references index: 1
> 
> 
> # myisamchk -dvv internet_usage
> 
> MyISAM file:         internet_usage
> Record format:       Fixed length
> Character set:       latin1 (8)
> File-version:        1
> Creation time:       2004-10-27 16:49:48
> Recover time:        2005-01-16  7:14:48
> Status:              checked
> Data records:            519541696  Deleted blocks:                 0
> Datafile parts:          519541696  Deleted data:                   0
> Datafile pointer (bytes):        4  Keyfile pointer (bytes):        4
> Datafile length:       16625334272  Keyfile length:        5006235648
> Max datafile length:  137438953470  Max keyfile length: 4398046510079
> Recordlength:                   32
> 
> table description:
> Key Start Len Index   Type                     Rec/key         Root  Bloc
> 1   2     4   multip. unsigned long                  0    445844480
> 
> Field Start Length Nullpos Nullbit Type
> 1     1     1
> 2     2     4
> 3     6     4
> 4     10    4
> 5     14    4
> 6     18    2      1       2
> 7     20    4      1       4
> 8     24    4      1       8
> 9     28    1
> 10    29    1
> 11    30    1
> 12    31    2
> 
> # ls -l internet*
> -rw-rw----   1 mysql    mysql    16625334272 Jan 16 07:14 internet_usage.MYD
> -rw-rw----   1 mysql    mysql    5006235648 Jan 17 09:05 internet_usage.MYI
> -rw-rw----   1 mysql    mysql       8856 Jul 09 2004  internet_usage.frm
> 
> mysql> show create table internet_usage \g
> 
> | internet_usage | CREATE TABLE `internet_usage` (
>  `uid` int(10) unsigned NOT NULL default '0',
>  `time` timestamp(14) NOT NULL,
>  `ip` int(10) unsigned NOT NULL default '0',
>  `urlid` int(10) unsigned NOT NULL default '0',
>  `timetaken` smallint(5) unsigned default '0',
>  `cs_size` int(10) unsigned default '0',
>  `sc_size` int(10) unsigned default '0',
>  `method_ID` tinyint(3) unsigned NOT NULL default '0',
>  `action_ID` tinyint(3) unsigned NOT NULL default '0',
>  `virus_ID` tinyint(3) unsigned NOT NULL default '0',
>  `useragent_ID` smallint(5) unsigned NOT NULL default '0',
>  KEY `uid` (`uid`)
> ) TYPE=MyISAM MAX_ROWS=4294967295 |
> 
> 1 row in set (0.00 sec)
> 
> mysql>
> 
> 
> Could anyone give me some advice on what else I can try to recover the data 
> please?
> 
> Thanks,
> 
> JS.
> 
> 
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
MYSQL + acquiring table relationshipsPaul Wallace17 Jan
  • lost dataJ S17 Jan
    • RE: lost dataJ S17 Jan
    • Re: lost dataGleb Paharenko18 Jan
RE: lost dataSST - Adelaide)17 Jan