[CWB] Error in cqpweb autosetup.php

mansur 6688000 at gmail.com
Mon Feb 15 11:39:13 CET 2021


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/aeadf623/attachment.html>


More information about the CWB mailing list