Page MenuHomePhabricator

[PostgreSQL] Query failed: ERROR: column "uoi_user_registration" does not exist ...ID::getUserOpenIDInformation */ uoi_openid,uoi_user_r... in includes/db/DatabasePostgres.php line 254
Closed, ResolvedPublic

Description

Author: anton.kochkov

Description:
Show this error on each user page.
Version of mediawiki is here: http://droid-developers.org/wiki/Special:Version

Warning: pg_query() [function.pg-query]: Query failed: ERROR: column "uoi_user_registration" does not exist LINE 1: ...ID::getUserOpenIDInformation Eiyee */ uoi_openid,uoi_user_r... ^ in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/resourceloader/ResourceLoaderWikiModule.php on line 201

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: Invalid argument supplied for foreach() in /home/droid-dev/www/includes/SpecialPageFactory.php on line 544

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254

Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/droid-dev/www/includes/db/DatabasePostgres.php on line 254
MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT uoi_openid,uoi_user_registration FROM "user_openid" WHERE uoi_user = '74'
Function: SpecialOpenID::getUserOpenIDInformation
Error: 1 ERROR: column "uoi_user_registration" does not exist
LINE 1: ...ID::getUserOpenIDInformation Eiyee */ uoi_openid,uoi_user_r...
^
' in /home/droid-dev/www/includes/db/Database.php:920
Stack trace:
#0 /home/droid-dev/www/includes/db/Database.php(887): DatabaseBase->reportQueryError('ERROR: column ...', 1, 'SELECT uoi_ope...', 'SpecialOpenID::...', false)
#1 /home/droid-dev/www/includes/db/Database.php(1360): DatabaseBase->query('SELECT uoi_ope...', 'SpecialOpenID::...')
#2 /home/droid-dev/www/extensions/OpenID/SpecialOpenID.body.php(341): DatabaseBase->select(Array, Array, Array, 'SpecialOpenID::...')
#3 /home/droid-dev/www/extensions/OpenID/OpenID.hooks.php(61): SpecialOpenID::getUserOpenIDInformation(Object(User))
#4 [internal function]: OpenIDHooks::onArticleViewHeader(Object(Article), false, false)
#5 /home/droid-dev/www/includes/Hooks.php(216): call_user_func_array('OpenIDHooks::on...', Array)
#6 /home/droid-dev/www/includes/GlobalFunctions.php(3789): Hooks::run('ArticleViewHead...', Array)
#7 /home/droid-dev/www/includes/Article.php(501): wfRunHooks('ArticleViewHead...', Array)
#8 /home/droid-dev/www/includes/actions/ViewAction.php(40): Article->view()
#9 /home/droid-dev/www/includes/Wiki.php(484): ViewAction->show()
#10 /home/droid-dev/www/includes/Wiki.php(278): MediaWiki->performAction(Object(Article))
#11 /home/droid-dev/www/includes/Wiki.php(593): MediaWiki->performRequest()
#12 /home/droid-dev/www/includes/Wiki.php(503): MediaWiki->main()
#13 /home/droid-dev/www/index.php(58): MediaWiki->run()
#14 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'SQL error: ERROR: current transaction is aborted, commands ignored until end of transaction block' in /home/droid-dev/www/includes/db/DatabasePostgres.php:313
Stack trace:
#0 /home/droid-dev/www/includes/WatchedItem.php(45): DatabasePostgres->numRows(false)
#1 /home/droid-dev/www/includes/User.php(2581): WatchedItem->isWatched()
#2 /home/droid-dev/www/includes/Title.php(1514): User->isWatched(Object(Title))
#3 /home/droid-dev/www/includes/SkinTemplate.php(962): Title->userIsWatching()
#4 /home/droid-dev/www/includes/SkinTemplate.php(446): SkinTemplate->buildContentNavigationUrls()
#5 /home/droid-dev/www/includes/OutputPage.php(1982): SkinTemplate->outputPage()
#6 /home/droid-dev/www/includes/Exception.php(182): OutputPage->output()
#7 /home/droid-dev/www/includes/Exception.php(209): MWException->reportHTML()
#8 /home/droid-dev/www/includes/Exception.php(490): MWException->report()
#9 /home/droid-dev/www/includes/Exception.php(569): MWExceptionHandler::report(Object(DBQueryError))
#10 /home/droid-dev/www/includes/Wiki.php(506): MWExceptionHandler::handle(Object(DBQueryError))
#11 /home/droid-dev/www/index.php(58): MediaWiki->run()
#12 {main}


Version: unspecified
Severity: normal

Details

Reference
bz34844

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:14 AM
bzimport set Reference to bz34844.

anton.kochkov wrote:

Bug in OpenID extension - there is patches directory with openid_table.pg.sql which doesnt have uoi_user_registration column, while openid_table.sql have such column.

Please indicate the complete version number of OpenID (see Special:Version),
and your MediaWiki.

Please see http://www.mediawiki.org/wiki/Extension_talk:OpenID#First_aid_checklist .

Did you run php update.php which updates the missing column ?

anton.kochkov wrote:

(In reply to comment #2)

Please indicate the complete version number of OpenID (see Special:Version),
and your MediaWiki.

Please see
http://www.mediawiki.org/wiki/Extension_talk:OpenID#First_aid_checklist .

Did you run php update.php which updates the missing column ?

Version of MediaWiki: 1.19alpha of OpenID 0.946-beta 20120201

anton.kochkov wrote:

(In reply to comment #2)

Please indicate the complete version number of OpenID (see Special:Version),
and your MediaWiki.

Please see
http://www.mediawiki.org/wiki/Extension_talk:OpenID#First_aid_checklist .

Did you run php update.php which updates the missing column ?

ah, forgot to add, update.php doesnt work, so i've added that column manually:

uoi_user_registration with "bytea" type for PostgreSQL

(In reply to comment #4)

ah, forgot to add, update.php doesnt work

Could you create another bug with details?

anton.kochkov wrote:

(In reply to comment #5)

(In reply to comment #4)

ah, forgot to add, update.php doesnt work

Could you create another bug with details?

sorry, forgot write bug number: https://bugzilla.wikimedia.org/show_bug.cgi?id=34846

ah, forgot to add, update.php doesnt work

Certainly because of the problem mentioned in https://bugzilla.wikimedia.org/show_bug.cgi?id=34846 "update.php: Call to undefined method PostgresField::isMultipleKey() in OpenID.hooks.php on line 361"

eric wrote:

Would it not be better to use $dbw->timestamp() instead of wfTimestamp with a binary field, or is that just a legacy design decision that we're sticking with?

FWIW, I hacked in the column as a timestamptz on my pg install and switched the code to use $dbw->timestamp().

honestly, I cannot support PostgreSQL due to lack of resources (time, money).

Change 92466 had a related patch set uploaded by saper:
Add uoi_user_registration for PostgreSQL

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

We are now using TIMESTAMPTZ. We don't support bytea for timestamps at all.

Change 92466 merged by Wikinaut:
Add uoi_user_registration for PostgreSQL

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

tested, verfied. merged version 3.43

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.