Last modified: 2013-04-22 16:16:17 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 T41287, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39287 - calling tableExists breaks fetchObject
calling tableExists breaks fetchObject
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 39480 42430
  Show dependency treegraph
 
Reported: 2012-08-12 18:59 UTC by Siebrand Mazeland
Modified: 2013-04-22 16:16 UTC (History)
6 users (show)

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


Attachments

Description Siebrand Mazeland 2012-08-12 18:59:30 UTC
Tried to run populateFuzzy.php on twn and got:

/www/w/extensions/Translate/scripts$ b php populateFuzzy.php
0/2734323
Error in fetchObject(): Table 'mediawiki.bw_revtag_type' doesn't exist (localhost)
Comment 1 Niklas Laxström 2012-08-12 19:45:38 UTC
Why are you trying to run that script?
Comment 2 Niklas Laxström 2012-08-12 20:02:34 UTC
Minimal test case:

$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page', '*', array(), array( 'LIMIT' => 2 ) );
foreach ( $res as $row ) { $dbr->tableExists( 'foo' ); }

Error in fetchObject(): Table 'sandwiki.bw_foo' doesn't exist (localhost)

PS: Could the error message also include class name?
Comment 3 Siebrand Mazeland 2012-08-12 20:18:27 UTC
(In reply to comment #1)
> Why are you trying to run that script?

To fuzzy some messages in Freecol that hadn't been fuzzier when they should have been, so I sometimes run this script to have checks done on all translations.
Comment 4 Tyler Romeo 2012-09-04 04:00:33 UTC
The reason for this is because mysql_fetch_object() does not reset the error number when it is successful (blame MySQL, not PHP). Added a patch that only checks for certain errors that are expected from mysql_fetch_*

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

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


Navigation
Links