mercredi 28 janvier 2015

Cannot add a column to an InnoDB table in Mariadb


I have this InnoDB table with less than 10 rows in mysql 5.5.40-MariaDB on Linux (x86_64).



+-----------------+--------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+-------------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| current_version | varchar(20) | NO | | NULL | |
| last_updated | timestamp | NO | | CURRENT_TIMESTAMP | |
| key | varchar(256) | NO | | NULL | |
| language | varchar(20) | NO | | NULL | |
| text | text | NO | | NULL | |
+-----------------+--------------+------+-----+-------------------+----------------+


When I try to add a column, the client hangs like so:



MariaDB [pkppln]> alter table terms_of_use add column `weight` int(11) not null default 0;
Stage: 2 of 2 'Enabling keys' 0% of stage done


The server continues to respond to other queries, but the client does nothing. I can kill the query with ctrl-C. The alter table command works in my dev environment, but seems to be failing here.


How can I fix this, and add the column?





Aucun commentaire:

Enregistrer un commentaire