List:General Discussion« Previous MessageNext Message »
From:Michal Ludvig Date:May 31 1999 12:36pm
Subject:MySQL dies with corrupted index
View as plain text  
Hi,
I have got a following table:

: CREATE TABLE ip_tbl (
:   ipid int(10) unsigned DEFAULT '0' NOT NULL,
:   ip varchar(18) DEFAULT '' NOT NULL,
:   dn varchar(64) DEFAULT '' NOT NULL,
:   dn1 int(10) unsigned DEFAULT '0' NOT NULL,
:   dn2 int(10) unsigned DEFAULT '0' NOT NULL,
:   rtime int(10) unsigned DEFAULT '0' NOT NULL,
:   flag int(10) unsigned DEFAULT '0' NOT NULL,
:   
:   PRIMARY KEY (ipid),
:   UNIQUE ip (ip),
:   UNIQUE dn (dn),
:   KEY dn1 (dn1),
:   KEY dn2 (dn2),
:   KEY rtime (rtime),
:   KEY flag (flag)
: );

and I'm inserting records like this:

: INSERT IGNORE INTO ip_tbl VALUES
(2990584515,'195.178.64.178','c-engine1.ten34.ces.net',1,1,924196794,0);
: INSERT IGNORE INTO ip_tbl VALUES
(3007361731,'195.178.64.179','c-engine2.ten34.ces.net',1,1,924196794,0);
: INSERT IGNORE INTO ip_tbl VALUES
(347371459,'195.119.180.20','robot.seznam.cz',2,2,928034112,0);
: INSERT IGNORE INTO ip_tbl VALUES
(1148032450,'194.149.109.68','lbcd004.pvt.net',1,3,924367800,0);
: INSERT IGNORE INTO ip_tbl VALUES
(3024138947,'195.178.64.180','c-engine3.ten34.ces.net',1,1,924196794,0);
: INSERT IGNORE INTO ip_tbl VALUES
(4196151235,'195.47.28.250','fw.pszt.cz',2,4,924367800,0);
: INSERT IGNORE INTO ip_tbl VALUES
(3057693379,'195.178.64.182','c-engine4.ten34.ces.net',1,1,924367801,0);
: [...]

After filling in a number of them (usually 60000 to 100000), MySQL dies:

: hop:root:/usr/local/mysql/var# cat /home2/mic/ipad | mysql -u mic dcres2
: hop:root:/usr/local/mysql/var# cat /home2/mic/ipae | mysql -u mic dcres2
: ERROR 2013 at line 1578: Lost connection to MySQL server during query
: Broken pipe
: hop:root:/usr/local/mysql/var# 
: Number of processes running now: 0
: mysqld restarted on  Mon May 31 14:19:47 CEST 1999

In error log there is nothing important:

: mysqld started on  Mon May 31 14:02:50 CEST 1999
: /usr/local/mysql/libexec/mysqld: ready for connections
: 
: Number of processes running now: 0
: mysqld restarted on  Mon May 31 14:04:33 CEST 1999
: 990531 14:04:38  Can't start server: Bind on TCP/IP port: Address already in use
: 990531 14:04:38  Do you already have another mysqld server running on port: 3306 ?
: 990531 14:04:38  Aborting

Line 1578 of file /.../ipae is:

: INSERT IGNORE INTO ip_tbl VALUES
(89502403,'195.178.85.5','195.178.85.5',0,0,922700250,4);
(nothing strange...)

And isamchk after that says:

: hop:root:/usr/local/mysql/var/dcres2# isamchk ip_tbl 
: Checking ISAM file: ip_tbl
: Data records:  101577   Deleted blocks:       0
: - check file-size
: - check delete-chain
: - check index reference
: - check data record references index: 1
: - check data record references index: 2
: isamchk: error: Key in wrong position at page 2071552
: - check record links
: isamchk: error: Keypointers and records dosen't match
: ISAM-table 'ip_tbl' is corrupted
: Fix it using switch "-r" or "-o"
: hop:root:/usr/local/mysql/var/dcres2# 

I'm using MySQL 3.22.22, but the same problem exists in 3.22.21 too.
What's wrong? Is it my fault od MySQL's? What should I do?

Thanks

Michal Ludvig

Thread
MySQL dies with corrupted indexMichal Ludvig31 May
  • Re: MySQL dies with corrupted indexJason Spears1 Jun
    • Re: MySQL dies with corrupted indexSasha Pachev1 Jun
  • MySQL dies with corrupted indexMichael Widenius3 Jun
Re: MySQL dies with corrupted indexMichal Ludvig31 May
  • Re: MySQL dies with corrupted indexDim Zegebart31 May
    • Re: MySQL dies with corrupted indexMichal Ludvig31 May
      • Re: MySQL dies with corrupted indexDim Zegebart31 May