[CWB] Error in cqpweb autosetup.php

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Feb 15 12:18:24 CET 2021


Hi Mansur,

Thanks for the report. Fixed in trunk.

best

Andrew.

From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of mansur
Sent: 15 February 2021 10:39
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: [CWB] Error in cqpweb autosetup.php

Hi!

I found a couple of problems in the most recent version of cqpweb.
The file: cqpweb/lib/sql-definitions.php

1) The problem is somewhere near "TYPE_DT_DATE, TYPE_DT_TIME":
        CREATE TABLE `metadata_template_info` (
                        `id`                         int unsigned NOT NULL AUTO_INCREMENT,
                        `description`                varchar(255) CHARSET utf8mb4 collate utf8mb4_unicode_520_nopad_ci default '',
                        `primary_classification`     varchar(64)      CHARSET ascii COLLATE ascii_bin default NULL,
                        primary key (`id`) TYPE_DT_DATE, TYPE_DT_TIME
                ) ENGINE=InnoDB
        /* from User: ??? | In file: /var/www/html/cqpweb/bin/autosetup.php @ line 104 | 2021-Feb-15 10:26 */</p>
<p class="errormessage">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' TYPE_DT_TIME
                ) ENGINE=InnoDB


2) In this case it seems one comma is missed:
        CREATE TABLE `saved_restrictions` (
                        `id`                         bigint unsigned NOT NULL AUTO_INCREMENT,
                        `corpus_id`                  int unsigned NOT NULL,
                        `cache_time`                 int unsigned NOT NULL default 0,
                        `serialised_restriction`     text CHARSET utf8mb4 collate utf8mb4_nopad_bin,
                        `size_bytes`                 bigint unsigned NOT NULL default 0,
                        `n_ids`                      int unsigned NOT NULL default 0,
                        `n_items`                    int unsigned NOT NULL default 0,
                        `n_tokens`                   bigint unsigned NOT NULL default 0,
                        `data`                       longblob,
                        key (`corpus_id`),
                        key (`serialised_restriction`(191)),
                        key (`cache_time`)
                        primary key (`id`)
                ) ENGINE=InnoDB
        /* from User: ??? | In file: /var/www/html/cqpweb/bin/autosetup.php @ line 104 | 2021-Feb-15 10:32 */</p>
<p class="errormessage">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'primary key (`id`)
                ) ENGINE=InnoDB


With best wishes,
Mansur


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20210215/11e0dd4a/attachment.html>


More information about the CWB mailing list