Last modified: 2014-03-25 19:59:13 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 T30281, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28281 - Differentiate between MySQL and MySQL forks (ie MariaDB)
Differentiate between MySQL and MySQL forks (ie MariaDB)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: 1.23.0 release
Assigned To: Kevin Israel (PleaseStand)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-27 20:19 UTC by Sam Reed (reedy)
Modified: 2014-03-25 19:59 UTC (History)
7 users (show)

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


Attachments

Description Sam Reed (reedy) 2011-03-27 20:19:52 UTC
<mutante> just switched a mediawiki from MySQL to MariaDB on Debian squeeze, went all fine, wiki kept running.  on Special:Version "5.1.55-MariaDB-mariadb98~squeeze-log", the only minor thing is  the "Product" Link is eventually MySQL and link to mysql.com 
<Reedy> MariaDB isn't "supported" as a fork
Comment 1 Mark A. Hershberger 2011-03-29 23:59:49 UTC
I don't see any reason to really "push" this since it isn't MW's responsibility to promote MySQL.
Comment 2 Sumana Harihareswara 2011-11-02 22:22:21 UTC
The issue here is that MediaWiki thinks that the database is MySQL "because we're using mysql_* functions ...we assumed DatabaseMysql would only ever refer to mysql....  Presumably we'd like to have some way in php to differentiate the two."

I'm reaching out to the MariaDB community to see whether they care about this issue at all and would want to put any time into fixing it.

IRC conversation for context:

    <^demon> I dunno what MariaDB would need to do.
    <blobaugh> sumanah: that looks like an issue on the MariaDB side?
    <^demon> Presumably we'd like to have some way in php to differentiate the two.
    <blobaugh> the only way to fix that is to contribute the patch to them
    <sumanah> blobaugh: I mean, MariaDB people would donate a bit of time to fix it in MediaWiki.
    <^demon> Again...
    <^demon> I'm not sure what MariaDB needs to do?
    <^demon> We assume it's mysql because we're using mysql_* functions
    <blobaugh> ^demon: it looks like just change the link on the Special:Version page
    <Platonides> getSoftwareLink() currently returns a static string
    <Platonides> (DatabaseMysql class)
    <^demon> Platonides: Right. Because we assumed DatabaseMysql would only ever refer to mysql.
    <Platonides> the work is to somewhow differenciate between the two
    <blobaugh> so to fix it a new class would need to be made? DatabaseMariaDb?
    <^demon> Platonides: But other than a software link, do we need to differentiate at all? 
    <^demon> ie: Would the subclass be anything other than overriding getSoftwareLink()? 
    <blobaugh> Not in the code, yet 
    <Platonides> make mysql family servers add a command 'SELECT UPSTREAM_LINK();' :) 
    <Platonides> I don't think so 
    <blobaugh> ^demon: afaik you are correct
    <Platonides> if we switched to it, perhaps we would begin optimizing some edge cases
    <G_SabinoMullane> I thought MariaDB was meant to be super transparent with regards to working MySQL code?
    <Platonides> but it's similar enough to mysql that I don't think we would make any change in the class
Comment 3 Sam Reed (reedy) 2013-04-15 23:56:31 UTC
I wonder if we actually really need to do anything further for this. From mediawiki.org just now:

MySQL	5.5.30-MariaDB-mariadb1~precise-log
Comment 4 Alex Monk 2013-04-16 00:08:29 UTC
(In reply to comment #3)
> I wonder if we actually really need to do anything further for this. From
> mediawiki.org just now:
> 
> MySQL    5.5.30-MariaDB-mariadb1~precise-log

Well it says 'MySQL' and the link goes to http://www.mysql.com/. So while we don't really need to change that, it seems appropriate considering it's not really MySQL, but a fork.
Comment 5 Tim Starling 2013-04-16 00:18:40 UTC
Database*::getSoftwareLink() is already being called non-statically from both WebInstallerPage and SpecialVersion. So it would be about 5 minutes' work to change the method declarations to be non-static and to fix DatabaseMysql::getSoftwareLink() to return something appropriate. In the WebInstallerPage case, the object is not connected to an actual server, which is not a problem, it's just an extra line of code to check for that.
Comment 6 Bawolff (Brian Wolff) 2013-04-16 00:51:20 UTC
Probably want to change config-type-mysql msg in installer to be "MySql or MariaDB"
Comment 7 Sam Reed (reedy) 2013-04-16 01:09:07 UTC
https://en.wikipedia.org/wiki/MySQL#Related_projects
Comment 8 Daniel Friesen 2013-04-16 01:26:55 UTC
Yeah it's not just MariaDB, it's also Percona Server (Drizzle doesn't support mysql's communication protocol so it's not relevant).

The return of VERSION() appears to at least hint what the server type is. We might just want to try and extract which server type it is out of that then look up a hardcoded list of MySQL derived server types and their urls.

Creating a subclass for MariaDB doesn't really sound like a great idea. That could make things turn into a mess if we decide to slowly ease into migrating from the mysql_* functions to MySQLi or PDO by creating something like a Database_MySQLi subclass.
Comment 9 Gerrit Notification Bot 2014-01-09 07:11:52 UTC
Change 106490 had a related patch set uploaded by PleaseStand:
Clean up config-support-* messages

https://gerrit.wikimedia.org/r/106490
Comment 10 Gerrit Notification Bot 2014-01-10 08:44:55 UTC
Change 106489 had a related patch set uploaded by PleaseStand:
WebInstaller: Don't call getSoftwareLink()

https://gerrit.wikimedia.org/r/106489
Comment 11 Gerrit Notification Bot 2014-01-10 08:46:45 UTC
Change 106490 abandoned by PleaseStand:
Clean up config-support-* messages

Reason:
Squashed into I6dbc9d32, with message keys changed.

https://gerrit.wikimedia.org/r/106490
Comment 12 Gerrit Notification Bot 2014-01-11 21:57:23 UTC
Change 106489 merged by jenkins-bot:
WebInstaller: Don't call getSoftwareLink()

https://gerrit.wikimedia.org/r/106489
Comment 13 Kevin Israel (PleaseStand) 2014-01-15 00:36:56 UTC
The above change added detection for most versions of MariaDB, though I still have to fix detection of Percona Server.
Comment 14 Kevin Israel (PleaseStand) 2014-03-25 19:59:13 UTC
(In reply to Kevin Israel (PleaseStand) from comment #13)
> The above change added detection for most versions of MariaDB, though I
> still have to fix detection of Percona Server.

Decided not to do that, instead removing the broken check in f67543df0675.

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


Navigation
Links