Last modified: 2011-03-13 18:06:23 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 T25330, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23330 - DatabaseBase::selectSQLText() vs EXPLAIN
DatabaseBase::selectSQLText() vs EXPLAIN
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-26 18:49 UTC by Ryan Biesemeyer
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

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


Attachments
Move EXPLAIN functionality from DatabaseBase::selectSQLText to inheriting DatabaseMysql class (1.29 KB, patch)
2010-04-26 18:49 UTC, Ryan Biesemeyer
Details
Move EXPLAIN functionality to child classes (3.03 KB, patch)
2010-04-26 19:10 UTC, Ryan Biesemeyer
Details

Description Ryan Biesemeyer 2010-04-26 18:49:54 UTC
Created attachment 7333 [details]
Move EXPLAIN functionality from DatabaseBase::selectSQLText to inheriting DatabaseMysql class

EXPLAIN is implemented in different ways across different RDBMS. The current implementation of DatabaseBase::selectSQLText assumes we're using MySQL. Move this part of the abstract function to the specific DB that uses it in order to free up the abstract function to be inherited by other DB classes.

Patch provided to do just this.
Comment 1 Roan Kattouw 2010-04-26 18:51:57 UTC
Provided that no other DBMSes use this, feel free to go ahead and commit this.
Comment 2 Max Semenik 2010-04-26 18:55:11 UTC
EXPLAIN is also used by PG and Oracle, this patch will apparently break them.
Comment 3 Max Semenik 2010-04-26 19:06:29 UTC
To reduce code duplication, instead of overriding it in several classes, just rewrite it in DatabaseMssql, something like http://pastebin.com/QwrxLc3E
Comment 4 Ryan Biesemeyer 2010-04-26 19:10:01 UTC
Created attachment 7334 [details]
Move EXPLAIN functionality to child classes

Also touches DatabaseOracle and DatabasePostgres, fixes syntax error.
Comment 5 Ryan Biesemeyer 2010-04-26 20:33:55 UTC
Closing and changing this to "won't fix". MaxSem's solution works well and doesn't touch as much code, so I'll implement it. Thanks.

-yaauie

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


Navigation
Links