Closed Bug 1851354 Opened 1 year ago Closed 7 months ago

Blocklist MySQL 8.0 and newer in checksetup.pl

Categories

(Bugzilla :: Installation & Upgrading, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: justdave, Assigned: justdave)

References

(Regression)

Details

Attachments

(2 files, 10 obsolete files)

MySQL >= 8.0 currently does not work with Bugzilla due to 'groups' becoming a reserved keyword (it's the name of one of our tables).

While proper MySQL 8 support is in the works, it's not in place yet, and until then, we need to properly prevent people from trying to use it, because it will only be a headache.

Attached patch patch for 5.2 (obsolete) — Splinter Review
Assignee: installation → justdave
Status: NEW → ASSIGNED
Attachment #9351365 - Flags: review?(dylan)
Attached patch patch for 5.0.4 (obsolete) — Splinter Review
Attachment #9351366 - Flags: review?(dylan)
Attached patch patch for 5.0.4 (obsolete) — Splinter Review

got tabs in that last patch on accident, oops.

Attachment #9351366 - Attachment is obsolete: true
Attachment #9351366 - Flags: review?(dylan)
Attachment #9351367 - Flags: review?(dylan)
Attached patch patch for 4.4 (obsolete) — Splinter Review
Attachment #9351368 - Flags: review?(dylan)
Attachment #9351365 - Flags: review?(dylan) → review+
Attachment #9351367 - Flags: review?(dylan) → review+
Attachment #9351368 - Flags: review?(dylan) → review+
Attached patch patch for trunk (5.1) (obsolete) — Splinter Review
Attachment #9351369 - Flags: review?(dylan)
Attached patch patch for harmony (obsolete) — Splinter Review
Attachment #9351370 - Flags: review?(dylan)

The harmony patch here is wrong... it needs MariaDB 10.0 instead of 5.1.
Also the 5.2 patch is wrong... and has been since Bugzilla 5.0.5. Minimum MySQL version bump from 5.0.15 to 5.6.12 because of the InnoDB Fulltext index.

Will fix when I get the PRs created.

Attached file GitHub Pull Request for 5.2 (obsolete) —
Attachment #9351365 - Attachment is obsolete: true
Attachment #9351367 - Attachment is obsolete: true
Attached file GitHub Pull Request for 4.4 (obsolete) —
Attachment #9351368 - Attachment is obsolete: true
Attachment #9351369 - Attachment is obsolete: true
Attachment #9351369 - Flags: review?(dylan)
Attached file GitHub Pull Request for harmony (obsolete) —
Attachment #9351370 - Attachment is obsolete: true
Attachment #9351370 - Flags: review?(dylan)

(In reply to Dave Miller [:justdave] from comment #7)

Also the 5.2 patch is wrong... and has been since Bugzilla 5.0.5. Minimum MySQL version bump from 5.0.15 to 5.6.12 because of the InnoDB Fulltext index.

Yes, see bug 868867 and bug 868869.

Blocks: 868869

Per bug 868869 the minimum MariaDB needs to be 10.0.5
Updates patches coming up.

Blocks: 868867

Per bug 868867 the minimum DBD::mysql also needs to be 4.032

Pull requests for 5.2 and Harmony have been updated

For UTF-8 support. 4.001 makes sure that blobs aren't

  # marked as UTF-8.
  version => '4.032',

Your comment is confusing as you mention 4.001 but you require 4.032.

Err... what's this ugly formatting??? What did Bugzilla do to my previous comment??

In your patches, you require DBD::mysql to use MariaDB. I don't understand why. Why don't you require DBD::MariaDB instead? This would make more sense, IMO. See https://metacpan.org/dist/DBD-MariaDB

Also, wouldn't it be safer to require MySQL 5.7 instead of 5.6.12? Per https://endoflife.software/applications/databases/mysql, MySQL 5.6 reached EOL in February 2021. Also, per https://github.com/perl5-dbi/DBD-mysql/commit/9076a7f7, the next release of DBD::mysql will only support MySQL 5.7 and newer.

(In reply to Frédéric Buclin from comment #19)

In your patches, you require DBD::mysql to use MariaDB. I don't understand why. Why don't you require DBD::MariaDB instead? This would make more sense, IMO. See https://metacpan.org/dist/DBD-MariaDB

Because MySQL and MariaDB are compatible at the driver level. And if I read the documentation for DBD::MariaDB correctly, it can also be used with MySQL. They forked DBD::mysql because the maintainers were too slow with bug fixes.

For a quick fix designed to get MySQL 8 blocked until we get our compatibility issues fixed, this is good enough. We can definitely do this right on a future version. Although we'd need a Bugzilla::DB::MariaDB to go with it as well, which is the reason I don't want it in this set of patches.

Also, wouldn't it be safer to require MySQL 5.7 instead of 5.6.12? Per https://endoflife.software/applications/databases/mysql, MySQL 5.6 reached EOL in February 2021. Also, per https://github.com/perl5-dbi/DBD-mysql/commit/9076a7f7, the next release of DBD::mysql will only support MySQL 5.7 and newer.

We probably have lots of minimum versions on things that are prerequisites for us that are no-longer-supported versions. If we know we're not broken on that version why block it? Maybe they have some reason they can't upgrade. It'd be on them to make sure they're using security-supported versions of things.

Also worth noting: DBD::MariaDB is not available on Ubuntu 20.04. Users will be required to install it via CPAN if we require it.

Attachment #9354505 - Attachment is obsolete: true
Comment on attachment 9351397 [details] [review] GitHub Pull Request for 4.4 >diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm >+ db_blacklist => ['^[89]\.'], db_blacklist or db_blocklist ?? >+ 'mariadb' => {db => 'Bugzilla::DB::Mysql', db_version => '5.1', >+ # MariaDB is indistinguishable from MySQL, but skipped 8 and >+ # 9 so blacklist it anyway in case someone has the driver set blacklist or blocklist? >+ db_blacklist => ['^[89]\.'], Same here >+ # Disallow development versions >+ blacklist => ['_'], And here. etc... etc... There are several other places where you mix both blacklist and blocklist. This is inconsistent. IMO, the 4.4 branch is not the right place to do such changes. It's beyond the "security fixes only" policy.

(In reply to Frédéric Buclin from comment #27)

IMO, the 4.4 branch is not the right place to do such changes. It's beyond the "security fixes only" policy.

Should we just ignore the 4.4 branch on this on the grounds that anyone running it is probably on an older OS and they should be migrating to a newer branch if they have a newer OS with the versions that break the old Bugzilla?

(In reply to Dave Miller [:justdave] from comment #28)

Should we just ignore the 4.4 branch on this on the grounds that anyone running it is probably on an older OS and they should be migrating to a newer branch if they have a newer OS with the versions that break the old Bugzilla?

IMO, yes.

Comment on attachment 9351397 [details] [review] GitHub Pull Request for 4.4 We're dropping this from 4.4, since it's security updates only, and nobody should be installing it from scratch, only upgrading from an older release, and if they already have an older version, then they'll already know about this or have installed a version that already works with Bugzilla anyway.
Attachment #9351397 - Attachment is obsolete: true
No longer blocks: bugzilla-4.4.14
Comment on attachment 9351394 [details] [review] GitHub Pull Request for 5.2 The 5.2 branch now supports MySQL 8 so we no longer need this. The 5.6 minimum will still need to get done (bug 868869)
Attachment #9351394 - Attachment is obsolete: true
Attachment #9351394 - Flags: merged-

Comment on attachment 9351399 [details] [review]
GitHub Pull Request for harmony

MySQL 8+ support landed on Harmony as well, so this is no longer needed there, either.

Attachment #9351399 - Attachment is obsolete: true

Removing from 5.2 blockers

No longer blocks: bugzilla-5.2
No longer blocks: 868869
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Blocks: 1926298
No longer blocks: 1926298
Regressed by: 1926298
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: