[CWB] [CQPweb r1236] SQL error when updating DB

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Jun 10 06:35:23 CEST 2019


message_id  was changed from a key to a primary key back in 3.0.11 (https://sourceforge.net/p/cwb/code/439/) in Nov 2013.

.... but, mea culpa, I missed out listing those manual changes in the manual.

They *are* in the 3.0.16 upgrade script, but there is a slight bug, alas, which is probably why you have message_id as a key rather thana  primary key. 

Bug now fixed, in case anyone out there is still running 3.0. And the upgrade-database now checks for the bug.

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Stefan Evert
Sent: 08 June 2019 12:09
To: CWBdev Mailing List <cwb at sslmit.unibo.it>
Subject: Re: [CWB] [CQPweb r1236] SQL error when updating DB

I ran into a problem with the database upgrade for 3.2.37, too:

> An SQL query did not run successfully!
> Original query:
> 
> alter table `system_messages` drop primary key
> 	/* from User: ??? | Function: upgrade_3_2_36() | 2019-Jun-08 13:03 */ 
> Error # 1091: Can't DROP 'PRIMARY'; check that column/key exists

The issue seems to be that the table has a key ("message_id") but no primary key. Notice that it's listed as "MUL":

> mysql> describe system_messages;
> +------------+--------------+------+-----+-------------------+-----------------------------+
> | Field      | Type         | Null | Key | Default           | Extra                       |
> +------------+--------------+------+-----+-------------------+-----------------------------+
> | message_id | varchar(150) | YES  | MUL | NULL              |                             |
> | timestamp  | timestamp    | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
> | header     | varchar(150) | YES  |     |                   |                             |
> | content    | text         | YES  |     | NULL              |                             |
> | fromto     | varchar(150) | YES  |     | NULL              |                             |
> +------------+--------------+------+-----+-------------------+————————
> +------------+--------------+------+-----+-------------------+——————+

Please advise.

Best,
Stefan


_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list