Bug 1765860 - "Error: 19 NOT NULL constraint failed: revision.rev_text_id" after package update
Summary: "Error: 19 NOT NULL constraint failed: revision.rev_text_id" after package up...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mediawiki
Version: 30
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michael Cronenworth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-26 19:24 UTC by redhat
Modified: 2020-05-26 17:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-05-26 17:57:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description redhat 2019-10-26 19:24:20 UTC
Description of problem:
After updating the mediawiki package pages cannot be edited anymore.

Version-Release number of selected component (if applicable):
mediawiki-1.32.4-1.fc30

How reproducible:
Edit a page. Alway throws a SQL error.

Steps to Reproduce:
1. edit a page
2. commit changes
3.

Actual results:

 Datenbankfehler
 Es ist ein Datenbankabfragefehler aufgetreten. Dies könnte auf einen Fehler in der Software hindeuten.
 [XbSZ9TNqey7e3vK7dOndPgAAAAI] 2019-10-26 19:09:41: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBQueryError“

[XbSaYb7fd3xLIsT8Z6oclAAAAAs] /index.php?title=Essen&action=submit Wikimedia\Rdbms\DBQueryError from line 1506 of /usr/share/mediawiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: INSERT INTO revision (rev_page,rev_parent_id,rev_minor_edit,rev_timestamp,rev_deleted,rev_len,rev_sha1,rev_content_model,rev_content_format,rev_comment,rev_user,rev_user_text) VALUES ('10','614','0','20191026191129','0','5535','btpovotkkbp3rqeouy8st2whf9yxh3g',NULL,NULL,'WE 26./27.10.','0','192.168.22.81')
Function: MediaWiki\Revision\RevisionStore::insertRevisionRowOn/single-row
Error: 19 NOT NULL constraint failed: revision.rev_text_id

Backtrace:

#0 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1476): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1236): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(2078): Wikimedia\Rdbms\Database->query(string, string)
#3 /usr/share/mediawiki/includes/libs/rdbms/database/DatabaseSqlite.php(658): Wikimedia\Rdbms\Database->insert(string, array, string, string)
#4 /usr/share/mediawiki/includes/Revision/RevisionStore.php(773): Wikimedia\Rdbms\DatabaseSqlite->insert(string, array, string)
#5 /usr/share/mediawiki/includes/Revision/RevisionStore.php(568): MediaWiki\Revision\RevisionStore->insertRevisionRowOn(Wikimedia\Rdbms\DatabaseSqlite, MediaWiki\Revision\MutableRevisionRecord, Title, integer)
#6 /usr/share/mediawiki/includes/Revision/RevisionStore.php(506): MediaWiki\Revision\RevisionStore->insertRevisionInternal(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseSqlite, User, CommentStoreComment, Title, integer, integer)
#7 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(3815): MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}(Wikimedia\Rdbms\DatabaseSqlite, string)
#8 /usr/share/mediawiki/includes/libs/rdbms/database/DBConnRef.php(49): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#9 /usr/share/mediawiki/includes/libs/rdbms/database/DBConnRef.php(538): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#10 /usr/share/mediawiki/includes/Revision/RevisionStore.php(514): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#11 /usr/share/mediawiki/includes/Storage/PageUpdater.php(961): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#12 /usr/share/mediawiki/includes/Storage/PageUpdater.php(738): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment, User, integer)
#13 /usr/share/mediawiki/includes/page/WikiPage.php(1886): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#14 /usr/share/mediawiki/includes/EditPage.php(2285): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#15 /usr/share/mediawiki/includes/EditPage.php(1574): EditPage->internalAttemptSave(array, boolean)
#16 /usr/share/mediawiki/includes/EditPage.php(677): EditPage->attemptSave(array)
#17 /usr/share/mediawiki/includes/actions/EditAction.php(60): EditPage->edit()
#18 /usr/share/mediawiki/includes/actions/SubmitAction.php(38): EditAction->show()
#19 /usr/share/mediawiki/includes/MediaWiki.php(501): SubmitAction->show()
#20 /usr/share/mediawiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#21 /usr/share/mediawiki/includes/MediaWiki.php(860): MediaWiki->performRequest()
#22 /usr/share/mediawiki/includes/MediaWiki.php(517): MediaWiki->main()
#23 /usr/share/mediawiki/index.php(42): MediaWiki->run()
#24 {main}


Expected results:

New revision of paged is saved.

Additional info:

I already run "php update.php" as stated in the Mediwiki https://www.mediawiki.org/wiki/Manual:Update.php bu tthis did not help. BTW I expect this is run as post script if package is updated/upgraded.

Comment 1 Michael Cronenworth 2019-10-26 19:58:38 UTC
There is a post script if you configured your mediawiki according to the package instructions. If you didn't you will need to run the update.php script against the LocalSettings.php of your instance.

cd $wiki_path_that_has_LocalSettings
php /usr/share/mediawiki/maintenance/update.php --conf LocalSettings.php

I am not seeing any issues with my personal wiki instance.

Comment 2 redhat 2019-10-27 09:34:43 UTC
@Michael: this did not help.

Comment 3 Michael Cronenworth 2019-10-27 16:45:48 UTC
There may be a bug with the schema updater for your particular use case. I suggest filing a bug with upstream and see if they have an idea on how to fix it.

https://www.mediawiki.org/wiki/How_to_report_a_bug

Comment 4 redhat 2019-10-27 17:12:32 UTC
Will do.

Just to let you know that according to tables.sql the table col revision.rev_text_id is created as "rev_text_id int unsigned NOT NULL default 0". In my case it had no default clause. I could not find any update script that adds the "default 0" to the col definition. I modified the sql-file by hand and now it works.

Comment 5 Ben Cotton 2019-10-31 18:43:53 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Jukka Ketelaars 2019-11-29 21:52:48 UTC
FWIW, I had the same problem in MacOS 10.15.1 MediaWiki 1.33.1 (upgrading from 1.31.0 and also ran update.php) and fixed it by running the following patch:

cd ~/Sites/Wiki/maintenance
sudo php ./patchSql.php sqlite/archives/patch-rev_text_id-default.sql

Comment 7 Ben Cotton 2020-04-30 20:40:24 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Ben Cotton 2020-05-26 17:57:17 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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