[CWB] CQPweb: v 3.1.0 now usable, I think

Hardie, Andrew a.hardie at lancaster.ac.uk
Tue Jan 21 09:15:17 CET 2014


Could you copy-paste your "describe saved_dbs"?

It's clearly the same problem, a half-and-half state,  in that dbname is defined as a primary key already when the script tries to define it as such. The script expects the 3.0.16 state to be that dbname is a key but not a primary key.

Ta

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Markus Killer
Sent: 21 January 2014 08:12
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] CQPweb: v 3.1.0 now usable, I think

(2) - I'm running the script on an exact copy of the working 3.0.16 database (imported sql dump)

If I apply the

> alter table saved_dbs drop primary key; alter table saved_dbs add key 
> `dbname` (`dbname`);

I get this:

mki at ubuntu:/var/www/cqp-web-beta/bin$ sudo php upgrade-database.php Database version is now at < 3.1.0. Database will now be upgraded to 3.1.0...
A mySQL query did not run successfully!

Original query:

alter table mysql_processes add primary key (`dbname`)



Error # 1068: Multiple primary key defined


----------------------------------------
> From: a.hardie at lancaster.ac.uk
> To: m.killer at outlook.com; cwb at sslmit.unibo.it
> Date: Tue, 21 Jan 2014 07:52:49 +0000
> Subject: Re: [CWB] CQPweb: v 3.1.0 now usable, I think
>
> (1) Ach, that's a bug introduced by the previous bug fix! Changed & fixed in 508.
>
> (2) This occurs, I think, because you are running the script on a half-upgraded database, so some of the changes it is trying to make have already been made.
>
> Run this SQL command manually:
>
> describe saved_dbs;
>
> and look at the key status of the column "dbname". If it says "PRI", then you need to revert the DB by running the following:
>
> alter table saved_dbs drop primary key; alter table saved_dbs add key 
> `dbname` (`dbname`);
>
> If that's the only thing that was "halfway", it will fix the problem. If other things were half-and-half, you'll get stuck at a later point in the script next time you run it.
>
> One (slightly dangerous) way round that is to hack library.inc.php to comment out lines 222 and 223. Then, the script will trundle on even if one of the earlier commands does not run. That change would need to be reverted ASAP afterwards of course!
>
> Andrew. 		 	   		  
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list