Last modified: 2014-06-29 20:05:26 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 T69025, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67025 - If Special:Watchlist has nothing to show to user, some warnings appear
If Special:Watchlist has nothing to show to user, some warnings appear
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Florian
https://www.mediawiki.org/wiki/Thread...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-24 11:47 UTC by Jesús Martínez Novo (Ciencia Al Poder)
Modified: 2014-06-29 20:05 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
florian.schmidt.welzow: Backport_to_Stable+


Attachments

Description Jesús Martínez Novo (Ciencia Al Poder) 2014-06-24 11:47:45 UTC
This happens on a 1.23 installation, when using the mysql (and not the mysqli) driver. mysqli is not affected. Not sure about other drivers.

Backtrace:

> #0  DatabaseMysql->mysqlDataSeek() called at […/mediawiki-1.23.0/includes/db/DatabaseMysqlBase.php:377]
> #1  DatabaseMysqlBase->dataSeek() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:320]
> #2  SpecialWatchlist->outputChangesList() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:332]
> #3  ChangesListSpecialPage->webOutput() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:70]
> #4  ChangesListSpecialPage->execute() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:79]
> #5  SpecialWatchlist->execute() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPage.php:379]
> #6  SpecialPage->run() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPageFactory.php:503]
> #7  SpecialPageFactory::executePath() called at […/mediawiki-1.23.0/includes/Wiki.php:285]
> #8  MediaWiki->performRequest() called at […/mediawiki-1.23.0/includes/Wiki.php:588]
> #9  MediaWiki->main() called at […/mediawiki-1.23.0/includes/Wiki.php:447]
> #10 MediaWiki->run() called at […/mediawiki-1.23.0/index.php:46]
> <br />
> <b>Warning</b>:  mysql_data_seek() [<a href='function.mysql-data-seek'>function.mysql-data-seek</a>]: Offset 0 is invalid for MySQL result index 135 (or the query data is unbuffered) in <b>…/mediawiki-1.23.0/includes/db/DatabaseMysql.php</b> on line <b>186</b><br />
> #0  DatabaseMysql->mysqlDataSeek() called at […/mediawiki-1.23.0/includes/db/DatabaseMysqlBase.php:377]
> #1  DatabaseMysqlBase->dataSeek() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:325]
> #2  SpecialWatchlist->outputChangesList() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:332]
> #3  ChangesListSpecialPage->webOutput() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:70]
> #4  ChangesListSpecialPage->execute() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:79]
> #5  SpecialWatchlist->execute() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPage.php:379]
> #6  SpecialPage->run() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPageFactory.php:503]
> #7  SpecialPageFactory::executePath() called at […/mediawiki-1.23.0/includes/Wiki.php:285]
> #8  MediaWiki->performRequest() called at […/mediawiki-1.23.0/includes/Wiki.php:588]
> #9  MediaWiki->main() called at […/mediawiki-1.23.0/includes/Wiki.php:447]
> #10 MediaWiki->run() called at […/mediawiki-1.23.0/index.php:46]
> <br />
> <b>Warning</b>:  mysql_data_seek() [<a href='function.mysql-data-seek'>function.mysql-data-seek</a>]: Offset 0 is invalid for MySQL result index 135 (or the query data is unbuffered) in <b>…/mediawiki-1.23.0/includes/db/DatabaseMysql.php</b> on line <b>186</b><br />

Apparently, dataSeek is being used only on this special page. Should we check for rows before calling it, or implement this check inside the function itself?

$> find . -type f -exec grep -nH dataSeek {} \;
./specials/SpecialWatchlist.php:320:            $dbr->dataSeek( $rows, 0 );
./specials/SpecialWatchlist.php:325:            $dbr->dataSeek( $rows, 0 );
./db/DatabasePostgres.php:649:  function dataSeek( $res, $row ) {
./db/Database.php:126:  function dataSeek( $res, $row );
./db/DatabaseOracle.php:510:    function dataSeek( $res, $row ) {
./db/DatabaseSqlite.php:405:    function dataSeek( $res, $row ) {
./db/DatabaseMssql.php:321:     public function dataSeek( $res, $row ) {
./db/DatabaseMysqlBase.php:372: function dataSeek( $res, $row ) {
./db/DatabaseUtility.php:177:           $this->db->dataSeek( $this, $row );
./db/DatabaseUtility.php:188:                   $this->db->dataSeek( $this, 0 );

I've tested it myself on a local installation.
Comment 1 Jesús Martínez Novo (Ciencia Al Poder) 2014-06-24 12:00:51 UTC
The error doesn't happen on 1.22

Seems to be caused by Gerrit change #94677

There were checks for if ( $numRows == 0 ) { before that change.
Comment 2 Gerrit Notification Bot 2014-06-24 16:19:55 UTC
Change 141713 had a related patch set uploaded by Florianschmidtwelzow:
Check first, if there are rows to render

https://gerrit.wikimedia.org/r/141713
Comment 3 Gerrit Notification Bot 2014-06-24 17:02:48 UTC
Change 141723 had a related patch set uploaded by Florianschmidtwelzow:
Special:Watchlist: Don't try to render empty row

https://gerrit.wikimedia.org/r/141723
Comment 4 Gerrit Notification Bot 2014-06-24 17:37:01 UTC
Change 141713 merged by jenkins-bot:
Special:Watchlist: Don't try to render empty row

https://gerrit.wikimedia.org/r/141713
Comment 5 Gerrit Notification Bot 2014-06-24 18:10:59 UTC
Change 141723 merged by jenkins-bot:
Special:Watchlist: Don't try to render empty row

https://gerrit.wikimedia.org/r/141723
Comment 6 Bartosz Dziewoński 2014-06-29 20:05:26 UTC
Sorry :( Thank you for the fix!

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


Navigation
Links