From 30aa45b3c187f46c4341037e333c3effab4cff3b Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Tue, 14 May 2024 02:14:08 -0400 Subject: [PATCH 1/2] Bug 1893853: make request for bug number explicit on pull request template (#127) --- .github/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f0e4ee1f4d..ba470cf5ef 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,9 @@ This PR fixes/adds a feature... #### Additional info -* [bmo#](https://bugzilla.mozilla.org/show_bug.cgi?id=) +* [bug#](https://bugzilla.mozilla.org/show_bug.cgi?id=) + +NOTE: Bug number is required. If you haven't filed a bug on https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla yet, don't submit the Pull Request. Please edit the above link to put the bug number both immediately after the # character and after the = character at the end. You can delete this paragraph once you've added your bug number. #### Test Plan From 7d3837062cea7ae74d99d86d81e54a0775988484 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Tue, 14 May 2024 02:18:35 -0400 Subject: [PATCH 2/2] Bug 1896055: Don't talk to MariaDB with the MySQL driver (#129) --- Bugzilla/DB.pm | 38 +++++++++++++----------- template/en/default/setup/strings.txt.pl | 25 ++++++++++++++++ 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index c71e5f10e0..268f5cd477 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -277,13 +277,23 @@ sub bz_check_server_version { my $sql_vers = $self->bz_server_version; if (((lc($db->{name}) eq 'mysql') || (lc($db->{name}) eq "mariadb")) - && ($sql_vers =~ s/^5\.5\.5-//)) { - # Version 5.5.5 of MySQL never existed. MariaDB >= 10 always puts '5.5.5-' + && ($sql_vers =~ s/^5\.5\.5-// || $sql_vers =~ /-MariaDB/)) { + # Version 5.5.5 of MySQL never existed. MariaDB = 10 always puts '5.5.5-' # at the front of its version string to get around a limitation in the # replication protocol it shares with MySQL. So if the version starts with # '5.5.5-' then we can assume this is MariaDB and the real version number - # will immediately follow that. - $db = DB_MODULE->{'mariadb'}; + # will immediately follow that. This was removed in MariaDB-11.0. The + # version should always contain "MariaDB" if it is indeed MariaDB. + if (lc($db->{name}) eq 'mysql') { + if ($output) { + Bugzilla::Install::Requirements::_checking_for({ + package => $db->{name}, + wanted => $db->{version}, + ok => 0, + }); + } + die install_string('db_maria_on_mysql', {vers => $sql_vers}); + } } my $sql_dontwant = exists $db->{db_blocklist} ? $db->{db_blocklist} : []; my $sql_want = $db->{db_version}; @@ -307,22 +317,14 @@ sub bz_check_server_version { # Check what version of the database server is installed and let # the user know if the version is too old to be used with Bugzilla. if ($blocklisted) { - die <$sql_server, vers=>$sql_vers}); } if (!$version_ok) { - die < $sql_server, + vers => $sql_vers, + want => $sql_want, + }); } # This is used by subclasses. diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 449015b1e6..221f506661 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -56,10 +56,35 @@ END END cpanfile_created => "##file## created", cpan_bugzilla_home => "WARNING: Using the Bugzilla directory as the CPAN home.", + db_blocklisted => < "Setting up choices for standard drop-down fields:", + db_maria_on_mysql => < "Initializing bz_schema...", db_table_new => "Adding new table ##table##...", db_table_setup => "Creating tables...", + db_too_old => < 'done.', enter_or_ctrl_c => "Press Enter to continue or Ctrl-C to exit...", error_localconfig_read => <<'END',