Last modified: 2014-05-14 12:22:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64708, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62708 - Comments extension does not support SQLite as database backend // Error: 1 no such function: UNIX_TIMESTAMP
Comments extension does not support SQLite as database backend // Error: 1 no...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Comments (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jack Phoenix
:
Depends on:
Blocks: sqlite
  Show dependency treegraph
 
Reported: 2014-03-16 13:22 UTC by Rainer Rillke @commons.wikimedia
Modified: 2014-05-14 12:22 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rainer Rillke @commons.wikimedia 2014-03-16 13:22:28 UTC
A database query error has occurred. This may indicate a bug in the software.

    Query:
    SELECT Comment_Username,Comment_IP,Comment_Text,Comment_Date,UNIX_TIMESTAMP(Comment_Date) AS timestamp,Comment_user_id,CommentID,IFNULL(Comment_Plus_Count - Comment_Minus_Count,0) AS Comment_Score,Comment_Plus_Count AS CommentVotePlus,Comment_Minus_Count AS CommentVoteMinus,Comment_Parent_ID,CommentID FROM Comments WHERE Comment_Page_ID = '12' LIMIT 100
    Function: Comment::getCommentList
    Error: 1 no such function: UNIX_TIMESTAMP

Backtrace:

#0 /srv/www/htdocs/includes/db/Database.php(1123): DatabaseBase->reportQueryError('no such functio...', 1, 'SELECT  Comment...', 'Comment::getCom...', false)
#1 /srv/www/htdocs/includes/db/Database.php(1590): DatabaseBase->query('SELECT  Comment...', 'Comment::getCom...')
#2 /srv/www/htdocs/extensions/Comments/CommentClass.php(738): DatabaseBase->select(Array, Array, Array, 'Comment::getCom...', Array, Array)
#3 /srv/www/htdocs/extensions/Comments/CommentClass.php(1030): Comment->getCommentList(0)
#4 /srv/www/htdocs/extensions/Comments/CommentsHooks.php(89): Comment->display()
#5 [internal function]: CommentsHooks::displayComments(NULL, Array, Object(Parser), Object(PPFrame_DOM))
#6 /srv/www/htdocs/includes/parser/Parser.php(4012): call_user_func_array(Array, Array)
#7 /srv/www/htdocs/includes/parser/Preprocessor_DOM.php(1180): Parser->extensionSubstitution(Array, Object(PPFrame_DOM))
#8 /srv/www/htdocs/includes/parser/Parser.php(3147): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#9 /srv/www/htdocs/includes/parser/Parser.php(1212): Parser->replaceVariables('Test 3?3?<comme...')
#10 /srv/www/htdocs/includes/parser/Parser.php(395): Parser->internalParse('Test 3?3?<comme...')
#11 /srv/www/htdocs/includes/content/WikitextContent.php(319): Parser->parse('Test 3?3?<comme...', Object(Title), Object(ParserOptions), true, true, NULL)
#12 /srv/www/htdocs/includes/WikiPage.php(2072): WikitextContent->getParserOutput(Object(Title), NULL, Object(ParserOptions))
#13 /srv/www/htdocs/includes/WikiPage.php(1755): WikiPage->prepareContentForEdit(Object(WikitextContent), NULL, Object(User), 'text/x-wiki')
#14 [internal function]: WikiPage->doEditContent(Object(WikitextContent), '', 98, false, NULL, 'text/x-wiki')
#15 /srv/www/htdocs/includes/Article.php(1966): call_user_func_array(Array, Array)
#16 /srv/www/htdocs/includes/EditPage.php(1811): Article->__call('doEditContent', Array)
#17 /srv/www/htdocs/includes/EditPage.php(1811): Article->doEditContent(Object(WikitextContent), '', 98, false, NULL, 'text/x-wiki')
#18 /srv/www/htdocs/includes/EditPage.php(1236): EditPage->internalAttemptSave(Array, false)
#19 /srv/www/htdocs/includes/EditPage.php(428): EditPage->attemptSave()
#20 /srv/www/htdocs/includes/actions/EditAction.php(50): EditPage->edit()
#21 /srv/www/htdocs/includes/actions/EditAction.php(74): EditAction->show()
#22 /srv/www/htdocs/includes/Wiki.php(428): SubmitAction->show()
#23 /srv/www/htdocs/includes/Wiki.php(292): MediaWiki->performAction(Object(Article), Object(Title))
#24 /srv/www/htdocs/includes/Wiki.php(586): MediaWiki->performRequest()
#25 /srv/www/htdocs/includes/Wiki.php(447): MediaWiki->main()
#26 /srv/www/htdocs/index.php(49): MediaWiki->run()
#27 /srv/www/htdocs/index.php5(24): require('/srv/www/htdocs...')
#28 {main}


Notice: Uncommitted DB writes (transaction from DatabaseBase::query (DatabaseBase::query)). in /srv/www/htdocs/includes/db/Database.php on line 4118
Comment 1 Aaron Schulz 2014-03-16 19:19:17 UTC
Similar to https://gerrit.wikimedia.org/r/#/c/117435/1/backend/FlaggedRevsStats.php (this could use a core method).
Comment 2 Gerrit Notification Bot 2014-03-16 20:34:11 UTC
Change 118988 had a related patch set uploaded by Rillke:
SQLite compatibility by adding UNIX_TMESTAMP shim

https://gerrit.wikimedia.org/r/118988
Comment 3 Rainer Rillke @commons.wikimedia 2014-03-16 20:35:39 UTC
(In reply to Aaron Schulz from comment #1)
Until it is, everyone will tinker custom solutions.
Comment 4 Rainer Rillke @commons.wikimedia 2014-03-16 21:48:10 UTC
Sorry but it is simply regrettable, that you cannot accept my patch; if I want to review code for this extension and test it locally, I will always have to patch it first just because ...

If you don't want collaborative coding, then host your stuff privately.


Well, maybe you come up with the proposal you describe more quickly than I think.
Comment 5 Gerrit Notification Bot 2014-03-16 21:48:38 UTC
Change 118988 abandoned by Rillke:
SQLite compatibility by adding UNIX_TMESTAMP shim

Reason:
Not in line with extension maintainer's point of view.

https://gerrit.wikimedia.org/r/118988
Comment 6 Andre Klapper 2014-03-16 22:26:30 UTC
I hope that perfect hasn't become the enemy of good here. :-/
Comment 7 Waldir 2014-05-12 10:25:40 UTC
Should this bug really be blocking block 20257? Isn't that bug for tracking SQLite support in core mediawiki?

If I'm reading Jack Phoenix's comment on gerrit right, there is indeed a limitation in core MW regarding timestamps, whose fixing would entail "convert[ing] the SQL schemas to use binary(14) instead of datetime to store the timestamp, as the standard MediaWiki convention is." But that ought to be a separate bug (which would then rightfully block 20257).

But I might be reading this incorrectly. Andre, can you clarify?
Comment 8 Andre Klapper 2014-05-14 12:22:00 UTC
About blocking bug 20257; I don't care about core vs extensions too much - in the end I want to be able to find SQLite issues. :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links