SemAnt

Tuesday, March 13, 2007

More 3store3

Had a little fun with 3store3 on Fedora Core 4, which is what I run on my servers. 3store3 builds easily on Fedora (in constrast to the fun had building 3store3 on a Mac. However, any SPARQL query beyond a simple listing of all triples just bailed out with scary errors. For example:

ts-explain "PREFIX dc:
SELECT DISTINCT ?s ?o WHERE { ?s
dc:title ?o . } LIMIT 10"
SQL error 2013: Lost connection to MySQL server during query at util.c:55
SQL error 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) at query.c:316
Warning cannot calculate complexity
Complexity: 0
SELECT DISTINCT v0.lexical AS `s`, v1.lexical AS `o`, v1.datatype AS
o_dt, v1.language AS o_lang
FROM (SELECT DISTINCT t0.object AS `o`, t0.subject AS `s`
FROM triples t0
WHERE t0.predicate=-8024650864867163606
LIMIT 10) AS `tmp0_202a`, symbols v0, symbols v1
WHERE tmp0_202a.s=v0.hash && tmp0_202a.o=v1.hash
LIMIT 10;

After much cursing, rebuilding,trying different versions of 3store3 and the Redland libraries, gave up and contemplated a crude hack. The SQL query itself works fine in MySQL, but not when 3store3 tries to call MySQL. But, before writing a crude hack I mailed the 3store3 mailing list this morning, and by 9:30 the same morning Steve Harris had given me the solution. I was running MySQL version 4.1.11, and according to Steve there's a bug in early verisons of MySQL 4. He recommended upgrading, so off to do yum install mysql. Sure enough, I get MySQL 4.1.20, and everything works. Yay!

5 Comments:

Post a Comment

<< Home