[CWB] SQL Syntax error when installing new corpus
Hardie, Andrew
a.hardie at lancaster.ac.uk
Wed Nov 6 20:44:05 CET 2019
I found this rather puzzling since the SQL in your error message runs fine for me. HOWEVER, at a second look I think that I can see that the error message is incomplete. Note here:
Original query: CREATE TABLE __tempfreq_mencow ( freq int(11) unsigned default NULL, word varchar(255) NOT NULL, lemma varchar(255) NOT NULL,namedentity varchar(255) NOT NULL, pos varchar(255) NOT NULL, possimple varchar(255) NOT NULL, key (word), key (lemma), key (pos), key (possimple) ) CHARACTER SET utf8 COLLATE utf8_general_ci /* from User: cqpwebadmin_wxy | Function: corpus_make_freqtables() | 2019-Nov-05 12:48 */
“named entity” is listed as a field but there is no corresponding key(namedentity). Although all annotation forms should be mentioned twice.
Furthermore, the error message refers to line 6, but the “near xxx” info quotes code that is not on line 6 – it’s on line 4.
So, there is some text missing from the query. (and/or the error message).
Can you try to harvest the full error report again? IF the missing bits are due to the process of copy-pasting from the browser then try View-source and copy paste the part of the HTML code that contains the error. Or if all else fails take a screenshot.
Without a proper error message I can’t make any suggestions as to a solution.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of D. Yuan
Sent: 05 November 2019 05:56
To: cwb at sslmit.unibo.it
Subject: [External Sender] [CWB] SQL Syntax error when installing new corpus
Dear All,
I encounter the following SQL syntax error when I was trying to install a new corpus:
my MySQL version is
+-----------------+
| @@version |
+-----------------+
| 8.0.17-0ubuntu2 |
+-----------------+
___________________
An SQL query did not run successfully!
Original query: CREATE TABLE __tempfreq_mencow ( freq int(11) unsigned default NULL, word varchar(255) NOT NULL, lemma varchar(255) NOT NULL,namedentity varchar(255) NOT NULL, pos varchar(255) NOT NULL, possimple varchar(255) NOT NULL, key (word), key (lemma), key (pos), key (possimple) ) CHARACTER SET utf8 COLLATE utf8_general_ci /* from User: cqpwebadmin_wxy | Function: corpus_make_freqtables() | 2019-Nov-05 12:48 */
Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(255) NOT NULL, lemma varchar(255) NOT NULL at line 6
___________________
Thank you very much for your help in advance.
Best,
D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20191106/ebe8001a/attachment.html>
More information about the CWB
mailing list