Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In #3107113: [policy] Decide on MySQL/MariaDB/Percona Server version support status for Drupal 9 the general direction of raising MySQL requirements to 5.7 and MariaDB requirements to 10.2 was agreed on.
Proposed resolution
Raise version requirements.
It was discussed that this may require resolving #2985788: Add a separate MariaDB driver first, but that does not seem to be the case.
Remaining tasks
Raise version requirements.
Update documentation.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
Raised the minimum MySQL version to 5.7 and MariaDB version to 10.2 in Drupal 9. See https://www.drupal.org/node/3119156
Comments
Comment #2
andypostJust to make sure tests can catch
For ref it introduced in https://git.drupalcode.org/project/drupal/commit/70dfc3bef9bdad7188c5754...
Comment #3
Gábor Hojtsy@andypost: how does this raise the MariaDB version number? What should we do to make that happen?
Comment #4
daffie CreditAttribution: daffie commentedI think we should create a method that analyzes the version string and returns an array with the database type and the short version string.
Comment #5
andypostIf we gonna make this "detection method" then probably no driver split required.
Otoh the next logical step is populate "reserved keywords" per version string... Which is sole role of Requiments class for "capabilities detection"
Comment #6
daffie CreditAttribution: daffie commentedWhat I think is going to happen is that we get site owners who think that MySQL and MariaDB are interchangeable. They going to use the setting that they have a MySQL database and then connect it to a MariaDB. And we do not catch this, it will result is some strange bugs.
Comment #7
Gábor Hojtsy@daffie: if we should do #2985788: Add a separate MariaDB driver, it would be nice to do that ASAP :) We should be able to do that in a backwards compatible way in Drupal 8 though and only require the new mariadb driver specified in the connection settings starting Drupal 9.
Comment #8
daffie CreditAttribution: daffie commentedI am not sure, but if I were to take a guess about what the wises decision would be, then I would not create a separate driver for MariaDB. AFAIK: Maybe we get a couple of cases where MariaDB needs to be treated a little bit different. With the version string that we get from the database we can determine if we have a MySQL or a MariaDB database. I do however want to have a minimum version MariaDB and a maximum version MariaDB in the testbot.
Comment #9
Gábor Hojtsy@daffie: is this not the opposite of what you said in #6?
Comment #10
daffie CreditAttribution: daffie commented@Gabor: Sorry, I am not a native English speaker and I am also not the best communicator.
I think we can do it with one driver for MySQL and MariaDB. We shall need a detection method for determining whether it a MySQL or a MariaDB. Having two drivers has also disadvantages in site owner thinking that MariaDB is equivalent to MySQL database. I think we will have the least amount of problems if we do it with one driver. Both choices have their pro's and con's. In the long run we shall have to do two drivers (Drupal 10 or later).
We could build a check that when you select the MySQL or MariaDB driver that we test the database version string and then select for you the right driver.
If however the framework managers decide to for the two driver option that fine for me too.
Comment #11
Gábor Hojtsy@daffie and I discussed this briefly over slack. Looks like one driver sounds best. I asked for framework manager feedback. @catch wrote "One driver makes sense to me, especially if the only different logic we have is the version detection.". So looks like this is a go-ahead!
Comment #12
Gábor HojtsyUpdated issue summary.
Comment #13
Gábor HojtsyDid some digging with this.
Drupal\Core\Database\Driver\mysql\Install\Tasks::checkEngineVersion()
which checks the CLIENT version that isDatabase::getConnection()->clientVersion()
against conditions.Drupal\Core\Database\Driver\mysql\Install\Tasks::minimumVersion()
which has this dire warning:That said, apparently the prefixing is not there anymore in recent MariaDB versions.
Database::getConnection()->version()
) inDrupal\Core\Database\Install\Tasks::checkEngineVersion()
. Note how this is also called an engine like the first one.Drupal\Core\Database\Driver\mysql
driver handles MySQL, MariaDB, Percona and etc. Whatever etc. means. So we need to define and make sure the version checking works for Percona and "etc".I don't know exactly how to tell if the server is a MySQL or MariaDB or Percona or "etc".
Drupal\Core\Database\Connection::version()
uses$this->connection->getAttribute(\PDO::ATTR_SERVER_VERSION)
but its not apparent if there is an attribute that would tell you the server type. https://www.php.net/manual/en/pdo.getattribute.php says there isPDO::ATTR_SERVER_INFO
but I could not find promising docs online as to what to expect from that and what I found it looked more like the same asPDO::ATTR_SERVER_VERSION
. I don't have any of the alternate server types to try.Looks like what we need to do here is to modify
Drupal\Core\Database\Driver\mysql\Install\Tasks::minimumVersion()
to make the minimum version conditional of the remote server type (MariaDB, Percona, etc).Comment #14
TravisCarden CreditAttribution: TravisCarden at Acquia commentedHere's a patch that distinguishes between MySQL and MariaDB and updates their minimum required versions to those agreed upon. The method seems reliable, if indirect, and I don't see a better approach. Writing automated tests for this presents a unique challenge. @xjm suggests testing the patch as-is against now-unsupported database versions to confirm that it fails (proving that the new minimums are correctly enforced), and if we feel we need explicit coverage beyond that, writing tests that use database features absent from the latest unsupported versions. While the existing tests run, please voice your opinion about the need for new, explicit tests.
Comment #15
TravisCarden CreditAttribution: TravisCarden at Acquia commentedOops. Wrong copy pasta.
Comment #16
andypostComment #17
daffie CreditAttribution: daffie commentedI would like a separate helper method that takes as a parameter the database version and returns an array with the database type and the simplified database version number. That method can then be unit testable.
Comment #18
TravisCarden CreditAttribution: TravisCarden at Acquia commentedComment #19
TravisCarden CreditAttribution: TravisCarden at Acquia commentedHere's a patch with a tested helper method. I'm not in favor of passing arrays around, and since I don't know of a need for a simplified version string anywhere, I didn't add code to provide it. (YAGNI, you know.) No word yet on getting MariaDB on the testbot.
Comment #20
TravisCarden CreditAttribution: TravisCarden at Acquia commentedAlso, since the testbot blew up testing #15 on MySQL 5.5 (I don't know why it reported success in the UI), the essential functionality--rejecting unsupported versions appears to work in at least that case.
Comment #22
TravisCarden CreditAttribution: TravisCarden at Acquia commentedCoding standards fix.
Comment #24
daffie CreditAttribution: daffie commentedCould we add testing for: https://stackoverflow.com/questions/56601304/what-does-the-first-part-of...
Comment #25
TravisCarden CreditAttribution: TravisCarden at Acquia commentedWhat sort of testing do you have in mind, @daffie? I assume you don't just mean this?
Comment #26
Gábor HojtsyWhy does this fail on MySQL 5.7? It should work :)
Comment #27
daffie CreditAttribution: daffie commented@travisgrarden: The basic testing with a provider method is great. Thanks for that. The patch lloks great needs some more work:
Could we get this method to return an array with the database type, which it does now and the short version number like
10.2.0
.Could we change this to:
Adding the keys is not necessary and makes the provider method less readable.
The provider method need a docblock.
In Drupal unit testing we use mocks. See: https://phpunit.de/manual/6.5/en/test-doubles.html.
You can also look at other unit tests in Drupal core.
Comment #28
TravisCarden CreditAttribution: TravisCarden at Acquia commentedThanks, @daffie. :)
I don't perceive the need for this. There's no code anywhere that uses the short version number, and since this is an internal API (i.e., a protected method), there's no reason we can't just add another helper method in the future if the need arises.
Sure, why not? :)
Done.
I don't actually think this is a good case for a mock. The method under test is entirely isolated--it accesses nothing outside itself and has no side effects. How would a mock improve the coverage? As far as I can tell, it would only complicate the test for no benefit.
Comment #30
effulgentsia CreditAttribution: effulgentsia at Acquia commentedI agree. Mocking is for replacing the test subject's dependencies, not for replacing the test subject itself.
Cool! I didn't know that PHP 7 added support for anonymous classes. I think this will be the first addition of that into core. Previously, for similar situations (changing the visibility of a method to public so we can test it), we added a named class to the test file. E.g.,
TestPluginBase
withincore/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
. But that was when we still supported PHP 5. Now that we require PHP 7, I see no downside to using an anonymous class here.Let's add a @covers here so we know what method is being covered. Also, I think we should add a test for the
minimumVersion()
method as well.Comment #31
effulgentsia CreditAttribution: effulgentsia at Acquia commentedHm, maybe that's hard to unit test due to the dependency on
Database::getConnection()
. If so, I'd be fine with punting it to a followup that can explore how to dependency inject or otherwise mock that.Comment #32
daffie CreditAttribution: daffie commented@TravisCarden: The patch looks good. Thanks.
At the moment we only need the database type/distribution (MySQL or MariaDB) for minimum version testing. With the growing number of differences between MySQL and MariaDB, it would be good to store the type/distribution value in a class variable of the Connection class from the MySQL driver. Therefor we also should move the method
getDistributionFromVersion()
to the class Connection from the MySQL driver. Adding a getter method to the Connection class is then also necessary. I am not sure if we can use the existing methoddatabaseType()
for this.Comment #33
TravisCarden CreditAttribution: TravisCarden at Acquia commentedRe: #30, here's your requested
@covers
annotation, @effulgentsia.Re: #32, @daffie, if there's such a growing number of differences between MySQL that we foresee forking more logic, doesn't it make more sense to go ahead and create a separate driver for MariaDB? (See #2985788: Add a separate MariaDB driver.) It's the textbook case for polymorphism. In fact, if we can't depend on feature parity and API equivalence between the two distributions for the foreseeable future, we have to separate them now to prevent either being constrained to a decaying object model or surprising people with a BC break in a minor version release. Right? Naturally, I'm open to being proved wrong. :)
Comment #35
TravisCarden CreditAttribution: TravisCarden at Acquia commented@daffie, since the current patch works under present conditions and any significant increase in conditional logic will probably be handled in #2985788: Add a separate MariaDB driver, what if we go ahead and proceed with this as-is in the interests of keeping the code clean and moving on to spend our time on more pressing matters? We can comment on the other issue to make sure the distribution test is moved to somewhere more appropriate.
Comment #36
daffie CreditAttribution: daffie commented@TravisCarden: The problem that we face with MariaDB is that at the moment the database driver is the same as the one for MySQL. However we do not know how long that will last. Any new version from MySQL or MariaDB can change that. Any difference will propably be small. I would like Drupal core to be prepared for such an event.
Creating a seperate driver for MariaDB is a solution, but has its down sides for Drupal core. We would like to have the MariaDB driver to be dependent on the MySQL driver. Just like themes can be dependent on each other. However database drivers in Drupal core are not seperate entities, like themes are. Database drivers are fully merged in core (in the directory core/lib/Drupal/Core/Database/Driver). In other parts of core there also is specific code for MySQL. Just do a search for
'mysql'
on the code of core. That all makes creating a new database driver that is depended on another not very staight forward.What I also would like is to make database drivers into seperate entities, just like themes are. Move the by core supported drivers to
core/databases
and the contrib ones todatabases
.And you are right @TravisCarden, that is a testbook case of polymorphism. When we have differences that will result in the MySQL and MariaDB drivers being different we shall need a seperate driver for MariaDB. I do not think that this will be the case for Drupal 9, but I do not know what the new releases of MySQL and MariaDB will bring. The pragmatic solution that I am suggestion is be prepared for such a difference and hope that it will not happen. If it happens it will propably be a small difference. Creating a seperate driver for MariaDB for Drupal9 after the release of Drupal 9 is not very end user/site owner friendly. Having possibly a bit of polymorphism as a fallback is something I can live with.
If you @TravisCarden or anybody else do not think that we should be prepared in such a way, then please say so.
Comment #37
xjmI requeued #33 because that fail was unexpected given what the patch does.
I think for this issue, we should restrict the scope to implementing the agreed-upon version requirements for MySQL and MariaDB. @daffie, are you proposing that there's a preferred way to do that that creates less public API? Or something else? If we want to further decouple the MariaDB implementation from MySQL since they're diverging, we can do that in a followup, but I don't think it should block this issue since this is a hard requirement and breaking change for Drupal 9.
Comment #38
xjmBack to NR since the patch passed as expected once the random fail was un-failed on the MySQL environment.
Comment #39
Gábor Hojtsy@xjm:
I think what @daffie is saying if we are to have separate drivers than the DB configuration will change for MariaDB users. Currently they are using "mysql" as far as Drupal is concerned. So if we are to introduce a MariaDB driver, then Drupal users on that DB will have to shut down their site and update the codebase, make sure to update the settings file and only then able to access Drupal again. I think there are three questions here then:
1. Do we foresee that we'll need a MariaDB driver in the lifetime of Drupal 9?
2. If so, should that be introduced before Drupal 9.0 or it would be fine somewhere in Drupal 9.x in a minor release?
3. If it needs to be introduced before Drupal 9.0, does it need to be in this issue or a followup? (Is the followup also a beta requirement?)
Comment #40
mondrakeNot sure how #33 can work in practice. Yes, we get a platform dependent MIN version number from
But this is checked at install time against the value returned from
Connection::version
in the install tasks:in case of MariaDB, the value returned will always be 5.5.5-sth, for example
5.5.5-10.3.22-MariaDB-0+deb10u1
.So the checkEngineVersion in case of MariaDB will always fail, because
MIN VERSION == '10.2.0'
RUNNING VERSION == '5.5.5-10.3.22-MariaDB-0+deb10u1'
and 5.5.5 is semver lower than 10.2.0.
No?
So I think MySql driver's
Connection::version
should return a version dependent on the platform, andTasks::minimumVersion
should determine the minimum one by getting the value of \PDO::ATTR_SERVER_VERSION independently fromConnection::version
.Comment #41
TravisCarden CreditAttribution: TravisCarden at Acquia commentedOh, you're right, @mondrake; good catch! My test case was wrong:
5.5.5-10.2.20-MariaDB-1:10.2.20+maria~bionic
should be considered MySQL, not MariaDB, due to its functional equivalence. I've fixed the test and made it pass. I believe my solution differed from your suggestion, but it's somewhat simpler and truer to the intention of the code and its comments, i.e., "MariaDB's version numbers diverged from MySQL's after 5.5... Earlier versions can be safely treated as MySQL."I also refactored
\Drupal\Core\Database\Install\Tasks::checkEngineVersion
for testability and added coverage for the version comparison code it in order to eliminate any uncertainty there.Comment #42
TravisCarden CreditAttribution: TravisCarden at Acquia commentedOops. Coding standards.
Comment #43
TravisCarden CreditAttribution: TravisCarden at Acquia commentedOh, and a namespace error.
Comment #44
mondrakeAlternative approach, along the lines of #40.
Comment #45
daffie CreditAttribution: daffie commentedOK, that is a different approach and I like it.
We still need testing for:
Connection::version()
,Tasks::name()
andTasks::minimumVersion()
.Comment #46
TravisCarden CreditAttribution: TravisCarden at Acquia commentedThis isn't actually the case anymore, @mondrake. My local installation, for example, reports a version string of
10.4.11-MariaDB
. I recommend using the regex from my patch, which causes MySQL-equivalent versions to fall back to MySQL. The test cases in my patch are valuable in this regard for exactly specifying the intended behavior.Comment #47
mondrake#46 right so the criteria is that 'MariaDB' should be in the string, and '5.5.5-' just removed if it's at the beginning. We can still fix that in the regex, then add back the test. On it.
Comment #48
mondrakeComment #49
mondrakeWith a test for
Connection::version
.Comment #50
effulgentsia CreditAttribution: effulgentsia at Acquia commentedAnyone know when this changed? #46 reports that at least that installation of 10.4 wasn't prefixed with 5.5.5. But, are other installations of 10.4 prefixed that way? What about installations of 10.2 or 10.3?
The reason I ask is that this patch changes the
version()
method itself to report the non-prefixed version, which seems quite sensible. However, to what extent is that a BC break? In other words, is it currently possible that contrib might be doing something like:And relying on the fact that MariaDB 10.2 would not enter that if statement? But now, with this patch, it would?
Or, is it already the case that MariaDB 10.2 dropped that prefix (at least on some installations), which would mean that even with HEAD, contrib can't be relying on that?
If the latter, then this change doesn't represent a BC break, but if the former, then it does.
Comment #51
mondrakeA more complete patch. I thought the returned string from version should include "all" the rest of the string, once '5.5.5-' is removed.
Comment #52
daffie CreditAttribution: daffie commentedIf there are sites out there with a MariaDB backend and its version string is something like "5.5.5-10.2.20-MariaDB", then yes that site will break after the current patch is committed. The only way we can to prevent this is to create a seperate driver for MariaDB. The same sites only now with a version string like "10.1.20-MariaDB" are already failing. MySQL 8 has capabilities that are not supported by MariaDB 10.2.
On the website of MariaDB there are pages with the differences between MySQL and MariaDB. If you compare the list with the function differences: https://mariadb.com/kb/en/function-differences-between-mariadb-102-and-m... and https://mariadb.com/kb/en/function-differences-between-mariadb-105-and-m..., you will see that the list has grown significantly. The same for the system variable differences: https://mariadb.com/kb/en/system-variable-differences-between-mariadb-10... and https://mariadb.com/kb/en/system-variable-differences-between-mariadb-10... is also significantly grown. If we as the Drupal community cannot live with differences for methods like
version()
, then we should create a seperate MariaDB driver. If we can live with such differences then the patch looks good to me. All points from the previous comments are addressed and for me it is RTBC. We still need a testbot with MySQL 5.7 and a MariaDB 10.2 to change the status of this issue.Comment #53
effulgentsia CreditAttribution: effulgentsia at Acquia commentedDo we know if those actually exist? Are there any builds of MariaDB 10.x that don't have a 5.y prefix in their version? What determines which MariaDB 10.x builds have the prefix and which don't? It probably makes sense to commit something like #51 regardless, but having this info will inform what we should write in the change record.
Comment #54
TravisCarden CreditAttribution: TravisCarden at Acquia commentedI have a few issues which it will be quicker/easier to create a patch for than to try to explain. I'll add one soon.
Comment #55
mondrake#53 it looks like the difference may come not from the server builds, rather from the linked client library - if that is mariadb aware then it will strip the 5.5.5 prefix before returning the value to PHP. See https://stackoverflow.com/questions/57496570/where-does-pdo-version-attr... and the github link from there.
Comment #56
TravisCarden CreditAttribution: TravisCarden at Acquia commentedOkay, here's my promised patch. It addresses the following concerns I alluded to:
Tasks
andConnection
smelled to me of feature envy on the one hand and leaky abstraction on the other. The repetition of the same regular expression multiple times wasn't DRY. I created a single, publicisMariaDB()
method onConnection
to encapsulate the logic (and considerably simplify the tests).I performed a strict and careful refactoring and ensured that @mondrake's original tests continued to pass until I refactored them, too.
Comment #57
mondrakemaybe these two methods could be moved to the abstract
Drupal\Core\Database\Install\Tasks
class, could be useful for other drivers, too.Comment #58
daffie CreditAttribution: daffie commentedThere is a problem with using Azure Database for MySQL 8. The problem is that
PDO::ATTR_SERVER_VERSION
returns a value like '5.6.42.0'. Which is the version of the Azure Database and not of MySQL 8. If you run the querySELECT version()
you get the version of MySQL and that is something like '8.0.15'. Because we are working on validating the MySQL/MariaDB version, maybe we can also fix it for Azure Database for MySQL 8. See: #3089902: "Azure Database for MySQL server" reports wrong database version.Comment #59
xjmI think #58 is out of scope for this issue and should be handled in a followup. Thanks @daffie!
Comment #60
TravisCarden CreditAttribution: TravisCarden at Acquia commentedShould I make another patch for @mondrake's suggestion in #57? Or can we RTBC this and move forward, creating a follow-up issue for Azure per @xjm's recommendation?
Comment #61
Gábor HojtsyThe getConnection() method looked odd but I see it was added for testability. I think @mondrake's #57 is a good idea to do, and I also agree Azure support should be a followup as its pre-existing.
Comment #62
Gábor HojtsyComment #63
TravisCarden CreditAttribution: TravisCarden at Acquia commentedHere's a patch updated with @mondrake's feedback in #57.
Comment #64
Gábor HojtsyLooks good to me. Would leave it to release managers (@xjm and @catch) whether this is committable before a MariaDB test host.
Comment #65
catchThe patch looks fine to me. Given we have unit tests with MariaDB version strings I think we could commit this now before the testbot is in place.
However this is still tagged for manual testing, is that still outstanding here or has someone done it?
Comment #67
catchManually tested locally with MariaDB. Install was fine, status report looks like this.
Committed 39a5437 and pushed to 9.0.x. Thanks!
Comment #68
effulgentsia CreditAttribution: effulgentsia at Acquia commentedYay! I'm happy to see this committed! Thanks for everyone who worked on it.
Can we raise the patch versions to the ones that support the JSON datatype? I can't think of a legitimate reason for anyone to be stuck on older patch versions.
Also, this patch updates INSTALL.txt.
Comment #69
catchThat seems very reasonable to me. RTBC pending the bot.
Comment #70
effulgentsia CreditAttribution: effulgentsia at Acquia commentedNote that https://www.percona.com/doc/percona-server/5.7/release-notes/release-not... doesn't contain versions less than 5.7.10, but I'm assuming we should still specify 5.7.8 here to match the MySQL version number.
Comment #71
xjmAccording to @Mixologic this is the commit that broke SQLite and Postgres, which is counterintuitive, but reverting and then re-running the patch on all DBs.
Comment #73
xjmSo, confirmed...
These might be the changes that broke it?
Comment #74
mondrakeThe installer calls thie ::name method while discovering the database drivers for all the drivers; the ::isMariaDb method is only defined for the MySql driver, so it will fail on other drivers.
Comment #75
xjmLooks like #74 is still failing (maybe failing differently) for a number of other DBs. Possibly including MySQL 8?
Comment #76
mondrakeOops
Comment #77
Gábor HojtsyHm, the environment which says its PHP 7.4 and MySQL 5.7 fails with
?!
Comment #78
mondrakeI suspect the PHP 7.4 failure is due to the fact that SQLite was unbundled from PHP in that version, and it falls back to the distro sqlite3 library which is pretty old. It's a known problem, HEAD fails with PHP 7.4 and SQLite already.
EDIT - yes, see the IS of #3107155: Discuss lowering SQLite version requirement from 3.26 to 3.22 in Drupal 9 for detailed findings.
Comment #79
catchQuickStartTest must rely on sqlite even though we're running MySQL tests.
Comment #80
mondrakeAlso, the fix in #76 seems to work for all dbs on 7.3 now, however I am not sure it's the correct one - why should the installer call, given a driver, the
Install/Tasks::name
method of other drivers?Comment #81
Gábor Hojtsy@mondrake: re #80 to display a select list to pick your database driver from.
Re the PHP 7.4 fail, how are we gonna solve it? It does not seem like we can commit this without having a test suit that keeps passing on PHP 7.4.
Comment #82
mondrakeSee #3107155-51: Discuss lowering SQLite version requirement from 3.26 to 3.22 in Drupal 9. I suggest to revert the SQLite bump. We need an issue to update the PHP 7.4 testbot contianers' sqlite3 library.
Comment #83
mondrake#81 right, but given each entry (=db driver) why aren't we calling only the
name
method of that driver, but also the other drivers' ones?Comment #84
Gábor Hojtsy@mondrake: that is how this selection list is generated?
It would call all the drivers that are available. If the names of non-compliant ones are attempted to be used before we are sure they are valid, that could in itself be a problem for hosts where a combination of databases are available but not necessarily the right versions.
Comment #85
mondrakeTrying a different approach re #80 @ #3113423-3: Ignore, testing issue.
Comment #86
xjmThe reason this is not passing on 7.4 was because of #3107155: Discuss lowering SQLite version requirement from 3.26 to 3.22 in Drupal 9, which has been reverted.
Comment #87
mondrakeLet's see this. Interdiff coming shortly.
Comment #88
mondrakeComment #89
mondrakeInterdiff. The failures in #63 were due, AFAICS, to the database settings of the main connection leaking in the test so that when
Database::connection
is called during the db driver discovery by thename
method, the main connection object (not the one due to be installed) is activated and returned to the MySql install tasks. So here we are preventing activating the db connection and checking that the connection object is the MySql one before invokingisMariaDb
.Comment #90
mondrakeComment #92
mondrakeFixes to get unit tests pass.
Comment #94
mondrakeComment #95
TravisCarden CreditAttribution: TravisCarden at Acquia commented#94 looks great! This is RTBC as far as I'm concerned. Incidentally, here's an interdiff between the previously committed patch and this one.
Comment #96
TravisCarden CreditAttribution: TravisCarden at Acquia commentedActually, I guess I can actually RTBC this since I didn't work on the latest patch.
Comment #98
catchLooks great. Committed 28b8b4e and pushed to 9.0.x. Thanks!
Hopefully sticks this time!
Comment #99
MixologicI've just finished building the mariadb containers, have them deployed, and you'll see two tests currently running on #94.
The regex in the commit needs some work:
So, the mariadb official docker container is where it gets
10.2.7-MariaDB-10.2.7+maria~jessie
So, not sure how many other variants we're going to see out there.Comment #100
Mixologicah. of course the patch failed to apply. I'll run these against head.
Comment #101
MixologicOkay, maybe its not the regex. 10.3.22 seems to be working: https://www.drupal.org/pift-ci-job/1608199
But 10.2.7 definitely fails: https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/15035/
I see a lot of already installed exceptions, so, not sure where thats coming from, but I still think it might be the regex.
Comment #102
Gábor Hojtsy@mixologic: let's open a followup issue to look into that IMHO. This is 102 comments in and the beta requirements are done especially since the fail seems to not be consistent. Opened #3119017: Tests fail with MariaDB 10.2.7, but not 10.3.22.
Comment #103
xjmOops, this needs a CR. It also should go in the release notes.
Comment #104
xjmComment #105
catchAdded the change record (and linked from the release note, although it doesn't really say anything extra).
Comment #106
effulgentsia CreditAttribution: effulgentsia at Acquia commentedOpened a follow-up: #3120124: Raise the minimum MariaDB version to 10.3(.7) in Drupal 9
Comment #108
fantajista CreditAttribution: fantajista as a volunteer commentedI'm using Drupal 8.8.6. The version of SQLite3 is 3.7.11. Is it possible to upgrade to the latest version (3.32.1)?
I was able to upgrade the version on the console, but it remains 3.7.11 on the Drupal management screen.
Comment #109
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedThis issue introduces methods in
core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
to correct the database version when Mariadb is in use. The end effect is that the database version on the Status Report page and the Upgrade Status page is correct when viewed on Drupal 9, but is incorrect viewed on Drupal 8, on Pantheon. It seems to me that this issue is larger than Pantheon, and should also happen anywhere Mariadb is used.Would it be possible to backport just the changes from
core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
to Drupal 8.9.x? In my testing, doing this fixed the Mariadb version-reporting problem for both the Status Report page and the Upgrade Status page.Comment #110
Gábor Hojtsy@greg.1.anderson: Good find! I think there is less risk in fixing Status report and Upgrade status direct than changing what version MariaDB reports. That could have ripple effects in whatever code is doing version based conditional things in contrib / custom code.
Comment #111
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedOK @Gábor Hojtsy, that is a good point. I'll work on a patch for the status report page on Drupal 8.9.x, and will put it in a new issue.
Comment #112
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedCreated follow-on issue #3213482: Backport Mariadb version lookup from Drupal 9.x to Drupal 8.9.x