Bug #35708 SIGABRT after mysql_upgrade and REPAIR table
Submitted: 31 Mar 2008 12:33 Modified: 20 May 2008 8:37
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.23-ndb-6.3.10-telco OS:Any
Assigned to: Martin Skold CPU Architecture:Any

[31 Mar 2008 12:33] Susanne Ebrecht
Description:
I was analysing bug #35606.

mysql> repair table t1;
+------------+--------+----------+----------+
| Table      | Op     | Msg_type | Msg_text |
+------------+--------+----------+----------+
| miracee.t1 | repair | status   | OK       | 
+------------+--------+----------+----------+
1 row in set (10.20 sec)

mysql> select * from t1 where num=144;
Assertion failed: (next_chunk <= buff_end), function open_binary_frm, file table.cc, line 987.
080331 14:01:25 - mysqld got signal 6;

How to repeat:
Install MySQL 5.0.45 from source.
Install MySQL 5.1.23-ndb-6.3.10-telco from source.

For MySQL 5.0.45:
$ ./bin/mysql_install_db

Now you can copy the test files from bug #35606 into your test database directory or you can create a new test table:

Start this instance and start CLI with your super user and join your test database

Create a test table with some rows. i.e.
Create table t1(id serial, num integer, primary key(id));

fill this table with a few rows. I filled it with 2^20 rows where num=rand()*1000 and later I made an: Update set num=rand()*1000 where num=0; until there weren't rows with 0 anymore.

Now copy the data dir from MySQL 5.0.45 to the MySQL Telco directory.

Start the MySQL Telco daemon.

On the Telco instance:
$ ./bin/mysql_upgrade

Start CLI from this instance with your super user and your test database

Make a test select from the test table i.e.:

mysql> select * from t1 where num=144;

You will get output and all works fine.

mysql> repair table t1;

You will get an OK.

know try to select something from the table i.e.:

mysql> select * from t1 where num=144;

Server crash

Suggested fix:
...
[31 Mar 2008 12:33] Susanne Ebrecht
Will start a deeper analysation of this problem.
[3 Apr 2008 9:13] Susanne Ebrecht
Setting to Cluster because this only occurs in 5.1.23-ndb-6.3.10-telco.
[7 Apr 2008 14:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/44999

ChangeSet@1.2581, 2008-04-07 16:28:07+02:00, mskold@mysql.com +1 -0
  table.cc:
    bug#35708 SIGABRT after mysql_upgrade and REPAIR table: Removed checks that block upgrade
[29 Apr 2008 13:16] Bugs System
Pushed into 5.1.24-ndb-6.2.14
[29 Apr 2008 13:20] Bugs System
Pushed into 5.1.24-ndb-6.3.13
[29 Apr 2008 17:46] Bugs System
Pushed into 5.1.23-ndb-6.4.0
[20 May 2008 8:37] Jon Stephens
Documented in the 5.1.24-ndb-6.2.16 and 5.1.24-ndb-6.3.14 changelogs as follows:

        mysqld failed to start after running mysql_upgrade.
[12 Dec 2008 23:25] Bugs System
Pushed into 6.0.6-alpha  (revid:sp1r-mskold/marty@mysql.com/quadfish.(none)-20080407142807-57304) (version source revid:jonas@mysql.com-20080808094047-4e1yiarqa2t3opg3) (pib:5)