Page MenuHomePhabricator

SQLite 3.x / 1.8.0.5 + 1.9 / SMW_SQLStore3_Queries / CREATE TEMPORARY TABLE ... "ENGINE": syntax error
Closed, ResolvedPublic

Description

Author: larchenkov.va

Description:
wiki.log

Hello,
System info:
Linux #37-Ubuntu SMP Wed Apr 25 12:51:49 UTC 2012 i686 i686 i386 GNU/Linux
Database: SQLite 3.x

Error: when make #ask query like {{#ask: [[Category:Programming language]] }}

Page returns:
CREATE TEMPORARY TABLE t1( id INT UNSIGNED KEY ) ENGINE=MEMORY
SMW::executeHierarchyQuery
1: near "ENGINE": syntax error

wiki.log: in attachment


Version: master
Severity: normal
OS: Linux

Attached:

Details

Reference
bz50155

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:02 AM
bzimport set Reference to bz50155.
bzimport added a subscriber: Unknown Object (MLST).

larchenkov.va wrote:

MediaWiki: 1.21.1
PHP: 5.3.10-1ubuntu3.6

Unknown Object (User) added a comment.Jun 25 2013, 10:58 AM

What SMW version you are running? The error is executed by [1].

Travs-ci.org[2] didn't show any issues with SQLite when running the unit tests but then again no one has written any "real" tests to cover SMW_SQLStore3_Queries, so it could well be an issue (well it is an issue otherwise the error would't have appeared).

[1] includes/storage/SQLStore/SMW_SQLStore3_Queries.php: $this->executeHierarchyQuery( $query );

[1] https://travis-ci.org/wikimedia/mediawiki-extensions-SemanticMediaWiki

PS: I changed the title to reflect the real issue.

larchenkov.va wrote:

Version of Semantic MediaWiki is 1.8.0.5

Unknown Object (User) added a comment.Jun 25 2013, 12:38 PM

SQLite was only fixed for SMW 1.9+ (because unit tests on Jenkins run on SQLite) therefore you might try the current master.

It is unlikely that fixes for SQLite on 1.8 will be provided.

larchenkov.va wrote:

Checkout last SMW from git.
I tested construction {{#ask: [[Category: *** ]] }} with different categories. The problem occurs when category have nested categories.

Unknown Object (User) added a comment.Feb 1 2014, 9:07 AM

Has been solved by [0] and will be deployed with 1.9.0.3.

[1] is used during regression testing (when running phpunit) and can be used locally to verify that the issue has been solved.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/151

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/regression/data/CategoryInstanceAndCategoryHierarchyRegressionTest-Mw-1-19-7.xml