[CWB] Create minimalist metadata table error

Hardie, Andrew a.hardie at lancaster.ac.uk
Sun Mar 28 17:59:19 CEST 2010


Hi Stefan,

Thanks very much for the comprehensive bug report. The fix you
identified was in absolutely the right way to fix it (I hadn't accounted
for differences in variable names between the main
create_text_metadata_for_() and create_text_metadata_for_minimalist()
when adding the text-id check to both functions... ) and I have added it
to the source tree in commit 140.

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it]
On Behalf Of Stefan Hecker
Sent: 21 March 2010 13:59
To: Open source development of the Corpus WorkBench
Subject: [CWB] Create minimalist metadata table error

Hi,

I just compiled and installed the SVN Version of CQPweb from
https://cwb.svn.sourceforge.net/svnroot/cwb/gui/cqpweb/trunk CQPweb-2.x

When I try to create a minimalist metadata table for a freshly importet
corpus, I get the following error:

	A mySQL query did not run successfully!

	Error # 1146:
	Table 'cwb.text_metadata_for_' doesn't exist

The corresponding sql-log looks like this:

100321 14:47:07    3236 Connect     cwb at localhost on
                   3236 Init DB     cwb
                   3236 Query       SET NAMES utf8
                   3236 Query       create table
`text_metadata_for_foo`(
                `text_id` varchar(50) NOT NULL,
                `words` INTEGER NOT NULL default '0',
                `cqp_begin` BIGINT UNSIGNED NOT NULL default '0',
                `cqp_end` BIGINT UNSIGNED NOT NULL default '0',
                primary key (text_id)
                ) CHARSET=utf8
                   3236 Query       LOAD DATA LOCAL INFILE
'/var/local/cwb/temp/___install_temp_metadata_foo' INTO TABLE
text_metadata_for_foo
                   3236 Query       select text_id from
text_metadata_for_ where text_id REGEXP '[^A-Za-z0-9_]'
                   3236 Quit

To me it looks like the create_text_metadata_check_text_ids-function
from admin-lib.inc.php gets called at line 1457 with the proper
argument, but the variable for the argument is not being initialized in
a proper way in the create_text_metadata_for_minimalist-function,
resulting in the incomplete query 'select text_id from
text_metadata_for_ where text_id REGEXP '[^A-Za-z0-9_]''

As a quick workaround I tried to replace the variable '$corpus' in line
1457 by '$corpus_sql_name', which seems to make it work without errors.
As I am sure this is not the correct way to fix this, could somebody
else please have a look at this issue?
Thanks very much!

Kind regards,
Stefan
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list