[Bug 684398] Re: mysqld crashes on certain ALTER TABLE queries (MySQL Bug #31145)

Imre Gergely 684398 at bugs.launchpad.net
Tue Jan 25 20:47:14 UTC 2011


Confirming fix works on Lucid


mysql> ALTER TABLE `grtdiff_alter_test`.`t1` DROP COLUMN `t` , ADD COLUMN `t2` TEXT NULL FIRST;
Query OK, 0 rows affected (0.13 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> \q
Bye
root at utest-lls32:~# apt-cache policy mysql-server
mysql-server:
  Installed: 5.1.41-3ubuntu12.9
  Candidate: 5.1.41-3ubuntu12.9
  Version table:
 *** 5.1.41-3ubuntu12.9 0
        500 http://ro.archive.ubuntu.com/ubuntu/ lucid-proposed/main Packages
        100 /var/lib/dpkg/status
     5.1.41-3ubuntu12.8 0
        500 http://ro.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
     5.1.41-3ubuntu12.7 0
        500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
     5.1.41-3ubuntu12 0
        500 http://ro.archive.ubuntu.com/ubuntu/ lucid/main Packages

root at utest-lls32:~# lsb_release -rd
Description:    Ubuntu 10.04.1 LTS
Release:        10.04

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.
https://bugs.launchpad.net/bugs/684398

Title:
  mysqld crashes on certain ALTER TABLE queries (MySQL Bug #31145)

Status in MySQL Server:
  Unknown
Status in “mysql-dfsg-5.1” package in Ubuntu:
  Fix Released
Status in “mysql-dfsg-5.1” source package in Lucid:
  Fix Committed
Status in “mysql-dfsg-5.1” source package in Karmic:
  Confirmed

Bug description:
  http://bugs.mysql.com/bug.php?id=31145

  This bug causes mysqld from "5.1.41-3ubuntu12.7" to segfault.  This is
  a simple 1 line fix that was added to MySQL 5.1.43.  Here is the
  patch: http://lists.mysql.com/commits/94936.

  Could you please backport this fix into the 5.1.41 package on Ubuntu
  10.04 LTS?

  ==== Info for SRU in Karmic, Lucid ====

  IMPACT: some ALTER TABLE queries crash the server.

  It is fixed in Maverick (mysql-server-5.1 5.1.49-1ubuntu8.1). Tested
  and confirmed.

  TEST CASE:

  Install mysql-server-5.1, use the CLI to run the following queries
  (taken from the upstream bugreport):

  CREATE DATABASE grtdiff_alter_test;
  CREATE TABLE grtdiff_alter_test.t1 (t TEXT, `id` int(11) DEFAULT NULL, `id2` int(11)
  DEFAULT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  ALTER TABLE `grtdiff_alter_test`.`t1` DROP COLUMN `t` , ADD COLUMN `t2` TEXT  NULL  FIRST;

  The last command will return:

  ERROR 2013 (HY000): Lost connection to MySQL server during query

  And in the /var/log/daemon.log you'll see:

  Dec 28 23:52:39 utest-lls32 init: mysql main process (2184) terminated with status 1
  Dec 28 23:52:39 utest-lls32 init: mysql main process ended, respawning
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2413]: Upgrading MySQL tables if necessary.
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2416]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2416]: Looking for 'mysql' as: /usr/bin/mysql
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2416]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2416]: This installation of MySQL is already upgraded to 5.1.41, use --force if you still need to run mysql_upgrade
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2423]: Checking for insecure root accounts.
  Dec 28 23:52:40 utest-lls32 /etc/mysql/debian-start[2427]: Triggering myisam-recover for all MyISAM tables

  a.k.a daemon crashed and was restarted.

  After applying the fix the above queries will run without a crash.

  REGRESSION POTENTIAL: should be low. The patch was taken directly from
  upstream (see above commit link).





More information about the Ubuntu-sponsors mailing list