Page MenuHomePhabricator

Problems upgrading some extensions under SQLite
Closed, InvalidPublic

Description

Author: brandonskypimenta

Description:

Running update.php in SQLite under PHP 5.3.0

When trying to do so, installing extensions that require database edits, you will get this SQLite syntax error:
Database returned error "1: near "AUTOINCREMENT": syntax error"

This is unusual. Why is this happening?


Version: unspecified
Severity: major
OS: Mac OS X 10.6
Platform: Macintosh

Details

Reference
bz38235

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:00 AM
bzimport set Reference to bz38235.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 7 2012, 6:32 PM
Jasper added a comment.Jul 7 2012, 6:35 PM

(This is not critical).

Which extensions?
AUTOINCREMENT is a mysql keyword. In SQLite it should be AUTO_INCREMENT. We have code in the Database file to compensate for it, but
a) Maybe it isn't working.
b) Maybe the extension is doing something wrong (making it incompatible with SQLite)

So, which extension has the bad update ?

brandonskypimenta wrote:

(In reply to comment #2)

Which extensions?
AUTOINCREMENT is a mysql keyword. In SQLite it should be AUTO_INCREMENT. We
have code in the Database file to compensate for it, but
a) Maybe it isn't working.
b) Maybe the extension is doing something wrong (making it incompatible with
SQLite)
So, which extension has the bad update ?

Some extensions include AbuseFilter and CheckUser. These extensions are using AUTO_INCREMENT. So what's wrong?

MaxSem added a comment.Jul 7 2012, 7:33 PM

(In reply to comment #2)

AUTOINCREMENT is a mysql keyword. In SQLite it should be AUTO_INCREMENT. We

Actually, it's vice versa;)

I was actually thinking that on rereading. I was misled with the syntax error near that problematic keyword.
Brandon, can you provide the full list of your extensions?
Or better yet, disable your extensions and enable them one a time until finding which one is producing that error.

brandonskypimenta wrote:

(In reply to comment #5)

I was actually thinking that on rereading. I was misled with the syntax error
near that problematic keyword.
Brandon, can you provide the full list of your extensions?
Or better yet, disable your extensions and enable them one a time until finding
which one is producing that error.

Here are my extensions:
Admin Links
Flagged Revisions
MultipleUpload
Nuke
Password Reset
Renameuser
Update
User Administration
WebChat
Cite
Countdown
EmbedVideo
InputBox
ParserFunctions
SimpleSecurity
SyntaxHighlight
ConfirmEdit
NewUserMessage
OnlineStatus
SpamBlacklist
Title Blacklist

brandonskypimenta wrote:

Possible I don't have AUTO_INCREMENT installed?

That's not something you should have to install.

brandonskypimenta wrote:

(In reply to comment #8)

That's not something you should have to install.

So then, what's wrong?

I have the same problem with AbuseFilter (bug 38371).

brandonskypimenta wrote:

Here's the problem: AUTO_INCREMENT should not be uppercase.

can you attach the entire log error?

Brandon:
Can you please attach the entire log error?

AUTO_INCREMENT can be uppercase.

It CaN aLsO bE cAmEl CaSeD, SQL is case-insensitive.

Thank you for your bug report.

After a better analysis, it appears some of the extensions you use have a schema written for MySQL and not for SQLite.

Some bugs have already been filed or commented by yourself:

  • Bug 37921 - Can't install FlaggedRevs extension with SQLite
  • Bug 38371 - Impossible to install AbuseFilter with SQLite

I'm closing this bug as invalid, as this is more a support request than a specific bugs (a bug is a specific problem related to the product).

If you detect an extension concerned, please open a new bug (one per extension) then add:

  • 20257 in the field Blocks
  • schema-change in the field keywords

If you need further support (for example, if you wish to migrate your wiki from SQLite to MySQL or have another issues), you can use the support desk on www.mediawiki.org:
http://www.mediawiki.org/wiki/Project:Support_desk

You can also use our IRC channel MediaWiki-General on irc.freenode.org.