Page MenuHomePhabricator

Impossible to install AbuseFilter with SQLite
Closed, ResolvedPublic

Description

Author: brandonskypimenta

Description:
MediaWiki: 1.17.3
SQLite: 3.6.12

PHP: 5.3.0

Since 1.17.3 does not have an sqlite file, I copied the sqlite file from git master to 1.17 snapshot. Tried to install, but when running update.php installation of AbuseFilter was skipped. When manually using sqlite3 to run the query, here's what I get:

SQL error near line 3: near "AUTO_INCREMENT": syntax error
SQL error near line 19: no such table: main.abuse_filter
SQL error near line 21: table abuse_filter_action already exists
SQL error near line 28: index afa_consequence already exists
SQL error near line 30: near "AUTO_INCREMENT": syntax error
SQL error near line 46: no such table: main.abuse_filter_log
SQL error near line 47: no such table: main.abuse_filter_log
SQL error near line 48: no such table: main.abuse_filter_log
SQL error near line 49: no such table: main.abuse_filter_log
SQL error near line 50: no such table: main.abuse_filter_log
SQL error near line 52: near "AUTO_INCREMENT": syntax error
SQL error near line 66: no such table: main.abuse_filter_history
SQL error near line 67: no such table: main.abuse_filter_history
SQL error near line 68: no such table: main.abuse_filter_history
SQL error near line 69: no such table: main.abuse_filter_history


Version: master
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=43507

Details

Reference
bz38371

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:09 AM
bzimport set Reference to bz38371.

Taking this bug.

Adding dependency to SQLite tracking bug (bug 20257).

(In reply to comment #0)

Since 1.17.3 does not have an sqlite file, I copied the sqlite file from git
master to 1.17 snapshot. Tried to install, but when running update.php
installation of AbuseFilter was skipped. When manually using sqlite3 to run
the
query, here's what I get:
SQL error near line 3: near "AUTO_INCREMENT": syntax error
[...]
SQL error near line 69: no such table: main.abuse_filter_history

We don't generally use SQLite schemas but directly use the MySQL schemas.

We also have a kludge to convert SQLite to MySQL, and manually run a query could bypass this code (this would explain why you have a faulty SQLite schema).

Gerrit change 40329

Change 40329 had a related patch set uploaded by Hashar:
sqlite: make autoincrement fields primary keys

https://gerrit.wikimedia.org/r/40329

Change 40329 had a related patch set uploaded by Hashar:
(bug 38371) Fixing SQL files for SQLite compatibility

https://gerrit.wikimedia.org/r/40329

Change 40329 merged by jenkins-bot:
(bug 38371) Fixing SQL files for SQLite compatibility

https://gerrit.wikimedia.org/r/40329

Merged the original change.