[CWB] [ cwb-Bugs-2959470 ] CQPweb: text_metadata_for_* text_id
field should be verified
SourceForge.net
noreply at sourceforge.net
Sun Feb 28 18:41:11 CET 2010
Bugs item #2959470, was opened at 2010-02-26 07:27
Message generated for change (Comment added) made by andrewhardie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=2959470&group_id=131809
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: CQPweb
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Andrew Hardie (andrewhardie)
Assigned to: Andrew Hardie (andrewhardie)
Summary: CQPweb: text_metadata_for_* text_id field should be verified
Initial Comment:
It is currently possible to insert text metadata with non-unique text_ids, which will create interesting errors. Solution:
* Add a UNIQUE constraint on the appropriate mysql table
* make sure an error message explaining what the problem is gets printed.
Similarly, it is possible for text_ids which are not valid C identifiers to be loaded into the table, but this will naturally cause problems later with all the code that assumes text_ids are valid C identifiers. So check this and write code to fall over gracefully.
----------------------------------------------------------------------
>Comment By: Andrew Hardie (andrewhardie)
Date: 2010-02-28 17:41
Message:
The problem of non-unique text_ids has actually already been solved when I
changed
key(text_id)
to
primary key(text_id)
back in commit 58, although this wouldn't have back-propagated to
already-indexed corpora. So, unique constraint not needed.
Note however that second/subsequent instances of a text_id are simply
ignored, with no error message.
A new function has been created that checks for non-C-identifiers in a
newly-created text metadata table; if any are found, the whole setup
process aborts.
All in v2.12, commit 118.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=2959470&group_id=131809
More information about the CWB
mailing list