Last modified: 2014-02-03 18:55:08 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 T44430, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42430 - Exception Caught: Error in numRows(): Table 'metawiki.revtag_type' doesn't exist (10.0.6.36)
Exception Caught: Error in numRows(): Table 'metawiki.revtag_type' doesn't ex...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.21.x
All All
: Normal major (vote)
: ---
Assigned To: Niklas Laxström
https://meta.wikimedia.org/wiki/Speci...
:
: 42633 44794 45283 45879 (view as bug list)
Depends on: 39287
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-25 11:25 UTC by Nemo
Modified: 2014-02-03 18:55 UTC (History)
11 users (show)

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


Attachments

Description Nemo 2012-11-25 11:25:43 UTC
When adding or removing a page from a group on [[m:Special:AggregateGroups]], the change is saved (as I can check by refreshing the page), but I get the error "Exception Caught: Error in numRows(): Table 'metawiki.revtag_type' doesn't exist (10.0.6.36)" which is a bit ugly at least.
Another error with revtag_type was bug 39287, provisionally adding it in dependencies.
Comment 1 Niklas Laxström 2012-11-25 11:50:10 UTC
This is an issue in the core database abstraction layer.

Minimal test case:

$db = wfGetDB( DB_SLAVE ); $res = $db->select( 'page', '*', array( 'page_id' => 1 ) ); $db->tableExists( 'foo' ); var_dump( $res->numRows() );
Error in numRows(): Table 'mediawiki.bw_foo' doesn't exist (localhost)
Comment 2 Chad H. 2012-11-26 13:35:46 UTC
Added failing test based on yours in https://gerrit.wikimedia.org/r/#/c/35149/
Comment 3 Nemo 2012-12-02 20:20:43 UTC
*** Bug 42633 has been marked as a duplicate of this bug. ***
Comment 4 Siebrand Mazeland 2012-12-02 20:55:04 UTC
Dependency for this issue appears to have been resolved (bug 39287), but the issue still exists.
Comment 5 Asaf Bartov 2013-01-31 20:54:45 UTC
happened to me just now, when trying to associate a page with a new aggregate group.
Comment 6 Nemo 2013-02-08 10:05:02 UTC
*** Bug 44794 has been marked as a duplicate of this bug. ***
Comment 7 Nemo 2013-02-22 15:25:34 UTC
*** Bug 45283 has been marked as a duplicate of this bug. ***
Comment 8 Siebrand Mazeland 2013-03-08 07:33:00 UTC
*** Bug 45879 has been marked as a duplicate of this bug. ***
Comment 9 Sam Reed (reedy) 2013-03-08 08:23:32 UTC
(In reply to comment #8)
> *** Bug 45879 has been marked as a duplicate of this bug. ***

Workaround for this specific case in translate: https://gerrit.wikimedia.org/r/#/c/52769/
Comment 10 Sam Reed (reedy) 2013-03-08 18:31:42 UTC
Minimal test case confirms it's ok in vanilla PHP.


<?php

$sql = "SELECT * FROM wikidb.mw_user LIMIT 1";
$sql1 = "SELECT 1 FROM foobar LIMIT 1";

$con=mysql_connect("","","");

$result = mysql_query($sql, $con);
$result1 = mysql_query($sql1, $con);

var_dump( (bool)$result1 ); echo "\n";
echo mysql_num_rows( $result ) . "\n";

mysql_close($con);


-----------------------------------

	/**
	 * @throws DBUnexpectedError
	 * @param $res ResultWrapper
	 * @return int
	 */
	function numRows( $res ) {
		if ( $res instanceof ResultWrapper ) {
			$res = $res->result;
		}
		wfSuppressWarnings();
		$n = mysql_num_rows( $res );
		wfRestoreWarnings();
		if( $this->lastErrno() ) {
			throw new DBUnexpectedError( $this, 'Error in numRows(): ' . htmlspecialchars( $this->lastError() ) );
		}
		return $n;
	}

It's strange, as the code in numRows() is very minimal and doesn't depend on any class member variables
Comment 11 Niklas Laxström 2013-03-10 09:48:40 UTC
Made https://gerrit.wikimedia.org/r/53020 based on https://gerrit.wikimedia.org/r/22537
Comment 12 Niklas Laxström 2013-03-12 07:01:29 UTC
If this is not backported, I need to consider Reedy's workaround for Translate as BC code.
Comment 13 Nemo 2013-04-13 07:11:00 UTC
Still needs backporting – only 2 days left.
Comment 14 Nemo 2014-02-03 08:35:15 UTC
Still needs manual cherry-pick.
Comment 15 Sam Reed (reedy) 2014-02-03 18:05:12 UTC
(In reply to comment #14)
> Still needs manual cherry-pick.

To 1.21?
Comment 16 Nemo 2014-02-03 18:33:01 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Still needs manual cherry-pick.
> 
> To 1.21?

Apparently... Unless someone rejects the backport request, that is.
Comment 18 Nemo 2014-02-03 18:55:08 UTC
Good then

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


Navigation
Links