Bug #713 4.0 "production release" corrupts files on install
Submitted: 24 Jun 2003 13:10 Modified: 24 Jun 2003 19:19
Reporter: Mark Matthews Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.13 OS:Microsoft Windows (Windows)
Assigned to: Miguel Solorzano CPU Architecture:Any

[24 Jun 2003 13:10] Mark Matthews
Description:
----- Original Message -----
From: "Alexander Keremidarski" <salle@mysql.com>
To: "Adam Pedersen" <adamp@adeptsoftware.com>
Cc: <bugs@lists.mysql.com>
Sent: Monday, June 23, 2003 2:49 PM
Subject: Re: 4.0 "production release" corrupts files on install

>> Hi,
>>
>> Adam Pedersen wrote:
>
>>> > That ftp path doesn't seem to exist. >
>
>>
>> Sorry. My fault. It is ftp://support.mysql.com/pub/mysql/secret
>>
>>
>
>>> > But the repro for both problems is small enough to put here:
>
>>
>>
>> Thanks.
>>
>
>>> > --
>>> > -- Table structure for table 'whosonline'
>>> > --
>>> >
>>> > DROP TABLE IF EXISTS whosonline;
>>> > CREATE TABLE whosonline (
>>> >   MemberID mediumint(8) unsigned NOT NULL default '0',
>>> >   PRIMARY KEY  (MemberID)
>>> > ) TYPE=MyISAM;
>>> >
>>> > /*!40000 ALTER TABLE whosonline DISABLE KEYS */;
>>> > --
>>> > -- Dumping data for table 'whosonline'
>>> > --
>>> >
>>> >
>>> > LOCK TABLES whosonline WRITE;
>>> > INSERT INTO whosonline VALUES (22588);
>>> >
>>> > /*!40000 ALTER TABLE whosonline ENABLE KEYS */;
>>> > UNLOCK TABLES;
>>> >
>>> > INSERT INTO whosonline SET MemberID="218";
>
>>
>> I just tried it and result is:
>>
>> mysql> select * from whosonline;
>> +----------+
>> | MemberID |
>> +----------+
>> |      218 |
>> |    22588 |
>> +----------+
>> 2 rows in set (0.09 sec)
>>
>>
>> which is expected result.
>>
>
>>> > --
>>> > -- end
>>> > --
>>> >
>>> > This fails right out of the box, with a clean database.  And if you

comment

>>> > out the last insert, it doesn't get the error 22, but it also doesn't

insert

>>> > anything into the table.  The top is from a dump from mysql 3.
>
>>
>> I tested it under Linux. We will test it under WinXP too, but I doubt such

kind of

>> bug can be OS related.
>>
>> Best regards
>>
>> --
>>   Are you MySQL certified? -> http://www.mysql.com/certification
>>   For technical support contracts, visit https://order.mysql.com/?ref=msal
>>      __  ___     ___ ____  __
>>     /  |/  /_ __/ __/ __ \/ /    Mr. Alexander Keremidarski

<salle@mysql.com>

>>    / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
>>   /_/  /_/\_, /___/\___\_\___/   Sofia, Bulgaria
>>           <___/  www.mysql.com

How to repeat:
At 03:07 PM 6/23/2003 -0500, Adam Pedersen wrote:
Hi Adam,

Thank you for the bug report I was able to repeat on Win2k server:

c:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.13-max-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> DROP TABLE IF EXISTS whosonline;
Query OK, 0 rows affected (0.02 sec)

mysql> CREATE TABLE whosonline (
    ->   MemberID mediumint(8) unsigned NOT NULL default '0',
    ->   PRIMARY KEY  (MemberID)
    -> ) TYPE=MyISAM;
Query OK, 0 rows affected (0.05 sec)

mysql> /*!40000 ALTER TABLE whosonline DISABLE KEYS */;
Query OK, 0 rows affected (0.01 sec)

mysql> LOCK TABLES whosonline WRITE;
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO whosonline VALUES (22588);
Query OK, 1 row affected (0.02 sec)

mysql> /*!40000 ALTER TABLE whosonline ENABLE KEYS */;
Query OK, 0 rows affected (0.00 sec)

mysql> UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO whosonline SET MemberID="218";
ERROR 1030: Got error 22 from table handler
mysql> check table whosonline;
+-----------------+-------+----------+-------------------------------------------------+
| Table           | Op    | Msg_type | Msg_text                                        |
+-----------------+-------+----------+-------------------------------------------------+
| test.whosonline | check | warning  | Table is marked as crashed                      |
| test.whosonline | check | warning  | Size of indexfile is: 2048      Should be: 1024 |
| test.whosonline | check | warning  | Size of datafile is: 5       Should be: 0       |
| test.whosonline | check | error    | Found 1 keys of 0                               |
| test.whosonline | check | error    | Corrupt                                         |
+-----------------+-------+----------+-------------------------------------------------+
5 rows in set (0.03 sec)

<cut>
[24 Jun 2003 13:25] Guilhem Bichot
Though Mark could repeat it on Windows, I couldn't on Linux (I just copied-pasted Mark's queries, no error 22, and CHECK TABLE doesn't complain).
[24 Jun 2003 13:31] Mark Matthews
Miguel and I were both able to reproduce it on MySQL-4.0.13 on Windows, so there is definitely something wrong there.
[24 Jun 2003 19:19] Mark Matthews
This has been re-submitted w/ cleaned-up comments as bug #716.