Last modified: 2013-08-21 19:55:13 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 T52740, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50740 - database query syntax error on course history
database query syntax error on course history
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
unspecified
All All
: Highest critical (vote)
: ---
Assigned To: Sage Ross
:
: 53170 (view as bug list)
Depends on:
Blocks: 49971
  Show dependency treegraph
 
Reported: 2013-07-04 11:48 UTC by Sage Ross
Modified: 2013-08-21 19:55 UTC (History)
6 users (show)

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


Attachments

Description Sage Ross 2013-07-04 11:48:05 UTC
On test2.wikipedia, the previous PHP fatal error on viewing course page history has been replaced with a database error:

    (SQL query hidden)

from within function "IndexPager::buildQueryInfo (EducationProgram\RevisionPager)". Database returned error "1176: Key 'rev_time' doesn't exist in table 'ep_revisions' (10.64.0.14)".
Comment 1 Sam Reed (reedy) 2013-07-04 14:25:27 UTC
(In reply to comment #0)
> On test2.wikipedia, the previous PHP fatal error on viewing course page
> history
> has been replaced with a database error:
> 
>     (SQL query hidden)
> 
> from within function "IndexPager::buildQueryInfo
> (EducationProgram\RevisionPager)". Database returned error "1176: Key
> 'rev_time' doesn't exist in table 'ep_revisions' (10.64.0.14)".

That would look like there's been a schema update internally, but not applied to the site..
Comment 2 Sam Reed (reedy) 2013-07-04 15:12:00 UTC
It seems to exist/be up to date..

mysql:wikiadmin@db1019 [test2wiki]> explain ep_revisions\G
*************************** 1. row ***************************
  Field: rev_id
   Type: int(10) unsigned
   Null: NO
    Key: PRI
Default: NULL
  Extra: auto_increment
*************************** 2. row ***************************
  Field: rev_object_id
   Type: int(10) unsigned
   Null: NO
    Key: MUL
Default: NULL
  Extra:
*************************** 3. row ***************************
  Field: rev_object_identifier
   Type: varbinary(255)
   Null: YES
    Key: MUL
Default: NULL
  Extra:
*************************** 4. row ***************************
  Field: rev_type
   Type: varbinary(32)
   Null: NO
    Key: MUL
Default: NULL
  Extra:
*************************** 5. row ***************************
  Field: rev_comment
   Type: tinyblob
   Null: NO
    Key:
Default: NULL
  Extra:
*************************** 6. row ***************************
  Field: rev_user_id
   Type: int(10) unsigned
   Null: NO
    Key: MUL
Default: 0
  Extra:
*************************** 7. row ***************************
  Field: rev_user_text
   Type: varbinary(255)
   Null: NO
    Key: MUL
Default: NULL
  Extra:
*************************** 8. row ***************************
  Field: rev_time
   Type: varbinary(14)
   Null: NO
    Key: MUL
Default: NULL
  Extra:
*************************** 9. row ***************************
  Field: rev_minor_edit
   Type: tinyint(3) unsigned
   Null: NO
    Key: MUL
Default: 0
  Extra:
*************************** 10. row ***************************
  Field: rev_deleted
   Type: tinyint(3) unsigned
   Null: NO
    Key: MUL
Default: 0
  Extra:
*************************** 11. row ***************************
  Field: rev_data
   Type: blob
   Null: NO
    Key:
Default: NULL
  Extra:
11 rows in set (0.00 sec)

mysql:wikiadmin@db1019 [test2wiki]> show indexes from ep_revisions\G
*************************** 1. row ***************************
       Table: ep_revisions
  Non_unique: 0
    Key_name: PRIMARY
Seq_in_index: 1
 Column_name: rev_id
   Collation: A
 Cardinality: 80
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 2. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_object_id
Seq_in_index: 1
 Column_name: rev_object_id
   Collation: A
 Cardinality: 80
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 3. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_type
Seq_in_index: 1
 Column_name: rev_type
   Collation: A
 Cardinality: 5
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 4. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_user_id
Seq_in_index: 1
 Column_name: rev_user_id
   Collation: A
 Cardinality: 26
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 5. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_user_text
Seq_in_index: 1
 Column_name: rev_user_text
   Collation: A
 Cardinality: 26
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 6. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_time
Seq_in_index: 1
 Column_name: rev_time
   Collation: A
 Cardinality: 80
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 7. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_minor_edit
Seq_in_index: 1
 Column_name: rev_minor_edit
   Collation: A
 Cardinality: 5
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 8. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_deleted
Seq_in_index: 1
 Column_name: rev_deleted
   Collation: A
 Cardinality: 5
    Sub_part: NULL
      Packed: NULL
        Null:
  Index_type: BTREE
     Comment:
*************************** 9. row ***************************
       Table: ep_revisions
  Non_unique: 1
    Key_name: ep_revision_object_identifier
Seq_in_index: 1
 Column_name: rev_object_identifier
   Collation: A
 Cardinality: 80
    Sub_part: NULL
      Packed: NULL
        Null: YES
  Index_type: BTREE
     Comment:
9 rows in set (0.00 sec)

mysql:wikiadmin@db1019 [test2wiki]>
Comment 3 Sam Reed (reedy) 2013-07-04 15:17:30 UTC
Yeah. It's trying to use the index 'rev_time' when it's actually called 'ep_revision_time'

reedy@fluorine:/a/mw-log$ grep rev_time dberror.log
Thu Jul 4 11:41:44 UTC 2013     mw1043  test2wiki       IndexPager::buildQueryInfo (EducationProgram\RevisionPager)     10.64.0.14      1176    Key 'rev_time' doesn't exist in table 'ep_revisions' (10.64.0.14)       SELECT  rev_id,rev_object_id,rev_object_identifier,rev_user_id,rev_type,rev_comment,rev_user_text,rev_minor_edit,rev_time,rev_deleted,rev_data  FROM `ep_revisions` FORCE INDEX (rev_time)   WHERE rev_type = 'EPCourses' AND rev_object_id = '7'  ORDER BY rev_time DESC LIMIT 51
Comment 4 John Blackburne 2013-07-24 00:06:05 UTC
Just seen this on en.wp, looking at the page history for 

https://en.wikipedia.org/wiki/Education_Program:Peer_to_Peer_University/Writing_Wikipedia_Articles_(2013_Q2)

i.e.

https://en.wikipedia.org/w/index.php?title=Education_Program:Peer_to_Peer_University/Writing_Wikipedia_Articles_(2013_Q2)&action=history

generates

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function ‘IndexPager::buildQueryInfo (EducationProgram\RevisionPager).’ Database returned error ‘1176: Key 'rev_time' doesn't exist in table 'ep_revisions' (10.64.32.22).’
Comment 5 Andre Klapper 2013-08-20 12:06:15 UTC
Sage:
As this ticket has "highest priority" for six weeks now:
Is anything blocking this, or is more information required (what, and by who)?
Comment 6 Sage Ross 2013-08-20 16:40:27 UTC
Andre: The blocker is that we don't currently have anyone working on the extension.
Comment 7 Gerrit Notification Bot 2013-08-20 18:58:08 UTC
Change 80076 had a related patch set uploaded by Ragesoss:
Fix course page history SQL error

https://gerrit.wikimedia.org/r/80076
Comment 8 Gerrit Notification Bot 2013-08-21 09:38:10 UTC
Change 80076 merged by jenkins-bot:
Fix course page history SQL error

https://gerrit.wikimedia.org/r/80076
Comment 9 Sam Reed (reedy) 2013-08-21 19:55:13 UTC
*** Bug 53170 has been marked as a duplicate of this bug. ***

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


Navigation
Links