foreach my $dbh ($main, $shadow) {
next if !$dbh;
$dbh->bz_rollback_transaction() if $dbh->bz_in_transaction;
- $dbh->disconnect;
}
my $smtp = $cache->{smtp};
$smtp->disconnect if $smtp;
use List::Util qw(max);
use Storable qw(dclone);
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
###############################
#### Initialization ####
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Login);
+use base qw(Bugzilla::Auth::Login);
use constant user_can_create_account => 1;
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Login);
+use base qw(Bugzilla::Auth::Login);
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Verify);
+use base qw(Bugzilla::Auth::Verify);
use Bugzilla::Constants;
use Bugzilla::Token;
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Verify);
+use base qw(Bugzilla::Auth::Verify);
use Bugzilla::Constants;
use Bugzilla::Error;
use Storable qw(dclone);
use Scalar::Util qw(blessed);
-use parent qw(Bugzilla::Object Exporter);
+use base qw(Bugzilla::Object Exporter);
@Bugzilla::Bug::EXPORT = qw(
bug_alias_to_id
LogActivityEntry
foreach my $comment (@{$self->{'comments'}}) {
$comment->{count} = $count++;
$comment->{bug} = $self;
-
- # XXX - hack for MySQL. Convert [U+....] back into its Unicode
- # equivalent for characters above U+FFFF as MySQL older than 5.5.3
- # cannot store them, see Bugzilla::Comment::_check_thetext().
- if ($is_mysql) {
-
- # Perl 5.13.8 and older complain about non-characters.
- no warnings 'utf8';
- $comment->{thetext}
- =~ s/\x{FDD0}\[U\+((?:[1-9A-F]|10)[0-9A-F]{4})\]\x{FDD1}/chr(hex $1)/eg;
- }
}
# Some bugs may have no comments when upgrading old installations.
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Util;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
use Bugzilla::Error;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl::Bugzilla);
+use base qw(Bugzilla::BugUrl::Bugzilla);
use Bugzilla::Error;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
#####################################################################
# Overriden Constants that are used as methods
use strict;
use warnings;
-use parent qw(CGI);
+use base qw(CGI);
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::Error;
use Bugzilla::Product;
-use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object Exporter);
+use base qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object Exporter);
@Bugzilla::Classification::EXPORT = qw(sort_products_by_classification);
###############################
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Attachment;
use Bugzilla::Comment::TagWeights;
$thetext =~ s/\s*$//s;
$thetext =~ s/\r\n?/\n/g; # Get rid of \r.
- # Characters above U+FFFF cannot be stored by MySQL older than 5.5.3 as they
- # require the new utf8mb4 character set. Other DB servers are handling them
- # without any problem. So we need to replace these characters if we use MySQL,
- # else the comment is truncated.
- # XXX - Once we use utf8mb4 for comments, this hack for MySQL can go away.
- state $is_mysql = Bugzilla->dbh->isa('Bugzilla::DB::Mysql') ? 1 : 0;
- if ($is_mysql) {
-
- # Perl 5.13.8 and older complain about non-characters.
- no warnings 'utf8';
- $thetext
- =~ s/([\x{10000}-\x{10FFFF}])/"\x{FDD0}[" . uc(sprintf('U+%04x', ord($1))) . "]\x{FDD1}"/eg;
- }
-
ThrowUserError('comment_too_long') if length($thetext) > MAX_COMMENT_LENGTH;
return $thetext;
}
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
+use base qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
use autodie qw(:default);
use Bugzilla::Constants;
die "The $file file does not exist."
. ' You probably need to run checksetup.pl.',;
}
+ die "the param utf8 must be set to utf8mb4" unless $params{utf8} eq 'utf8mb4';
+
return \%params;
}
use Bugzilla::Group;
use Bugzilla::Status;
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Config::Common::EXPORT
= qw(check_multi check_numeric check_regexp check_url check_group
check_sslbase check_priority check_severity check_platform
}
sub check_utf8 {
- my $utf8 = shift;
+ my ($utf8, $entry) = @_;
- # You cannot turn off the UTF-8 parameter if you've already converted
- # your tables to utf-8.
- my $dbh = Bugzilla->dbh;
- if ($dbh->isa('Bugzilla::DB::Mysql') && $dbh->bz_db_is_utf8 && !$utf8) {
- return "You cannot disable UTF-8 support, because your MySQL database"
- . " is encoded in UTF-8";
+ # You cannot turn off the UTF-8 parameter.
+ if (!$utf8) {
+ return "You cannot disable UTF-8 support.";
}
+ elsif ($entry eq 'utf8mb4' && $utf8 ne 'utf8mb4') {
+ return "You cannot disable UTF8-MB4 support.";
+ }
+
return "";
}
checker => \&check_email
},
- {name => 'utf8', type => 'b', default => '0', checker => \&check_utf8},
+ {
+ name => 'utf8',
+ type => 's',
+ choices => ['1', 'utf8', 'utf8mb4'],
+ default => 'utf8',
+ checker => \&check_utf8
+ },
{name => 'shutdownhtml', type => 'l', default => ''},
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
# For bz_locations
use File::Basename;
package Bugzilla::DB;
use 5.10.1;
-use strict;
-use warnings;
+use Moo;
use DBI;
+use DBIx::Connector;
+our %Connector;
-# Inherit the DB class from DBI::db.
-use parent -norequire, qw(DBI::db);
+has 'connector' => (is => 'lazy', handles => [qw( dbh )],);
use Bugzilla::Constants;
use Bugzilla::Mailer;
use List::Util qw(max);
use Storable qw(dclone);
+has [qw(dsn user pass attrs)] => (is => 'ro', required => 1,);
+
+
+# Install proxy methods to the DBI object.
+# We can't use handles() as DBIx::Connector->dbh has to be called each
+# time we need a DBI handle to ensure the connection is alive.
+{
+ my @DBI_METHODS = qw(
+ begin_work column_info commit disconnect do errstr get_info last_insert_id
+ ping prepare prepare_cached primary_key quote_identifier rollback
+ selectall_arrayref selectall_hashref selectcol_arrayref selectrow_array
+ selectrow_arrayref selectrow_hashref table_info
+ );
+ my $stash = Package::Stash->new(__PACKAGE__);
+
+ foreach my $method (@DBI_METHODS) {
+ my $symbol = '&' . $method;
+ $stash->add_symbol(
+ $symbol => sub {
+ my $self = shift;
+ return $self->dbh->$method(@_);
+ }
+ );
+ }
+}
+
#####################################################################
# Constants
#####################################################################
sub quote {
my $self = shift;
- my $retval = $self->SUPER::quote(@_);
+ my $retval = $self->dbh->quote(@_);
trick_taint($retval) if defined $retval;
return $retval;
}
"'$driver' is not a valid choice for \$db_driver in " . " localconfig: " . $@);
# instantiate the correct DB specific module
- my $dbh = $pkg_module->new($params);
-
- return $dbh;
+ return $pkg_module->new($params);
}
sub _handle_error {
my ($self, $db, $output) = @_;
my $sql_vers = $self->bz_server_version;
- $self->disconnect;
my $sql_want = $db->{db_version};
my $version_ok = vers_cmp($sql_vers, $sql_want) > -1 ? 1 : 0;
}
}
- $dbh->disconnect;
}
# A helper for bz_create_database and bz_check_requirements.
my $dbh;
my %connect_params = %{Bugzilla->localconfig};
$connect_params{db_name} = '';
+ local %Connector = ();
my $conn_success = eval { $dbh = _connect(\%connect_params); };
if (!$conn_success) {
my $driver = $connect_params{db_driver};
# Subclass Helpers
#####################################################################
-sub db_new {
- my ($class, $params) = @_;
- my ($dsn, $user, $pass, $override_attrs) = @$params{qw(dsn user pass attrs)};
+sub _build_connector {
+ my ($self) = @_;
+ my ($dsn, $user, $pass, $override_attrs)
+ = map { $self->$_ } qw(dsn user pass attrs);
# set up default attributes used to connect to the database
# (may be overridden by DB driver implementations)
my $attributes = {
- RaiseError => 0,
+ RaiseError => 1,
AutoCommit => 1,
PrintError => 0,
ShowErrorStatement => 1,
$attributes->{$key} = $override_attrs->{$key};
}
}
+ my $class = ref $self;
+ if ($class->can('on_dbi_connected')) {
+ $attributes->{Callbacks}
+ = {connected => sub { $class->on_dbi_connected(@_); return },};
+ }
- # connect using our known info to the specified db
- my $self = DBI->connect($dsn, $user, $pass, $attributes)
- or die "\nCan't connect to the database.\nError: $DBI::errstr\n"
- . " Is your database installed and up and running?\n Do you have"
- . " the correct username and password selected in localconfig?\n\n";
-
- # RaiseError was only set to 0 so that we could catch the
- # above "die" condition.
- $self->{RaiseError} = 1;
-
- bless($self, $class);
-
- return $self;
+ return $Connector{"$user.$dsn"}
+ //= DBIx::Connector->new($dsn, $user, $pass, $attributes);
}
#####################################################################
package Bugzilla::DB::Mysql;
use 5.10.1;
-use strict;
-use warnings;
+use Moo;
-use parent qw(Bugzilla::DB);
+extends qw(Bugzilla::DB);
use Bugzilla::Constants;
use Bugzilla::Install::Util qw(install_string);
use Bugzilla::Error;
use Bugzilla::DB::Schema::Mysql;
-use List::Util qw(max);
+use List::Util qw(max any);
use Text::ParseWords;
+use Carp;
# This is how many comments of MAX_COMMENT_LENGTH we expect on a single bug.
# In reality, you could have a LOT more comments than this, because
use constant FULLTEXT_OR => '|';
-sub new {
+sub BUILDARGS {
my ($class, $params) = @_;
my ($user, $pass, $host, $dbname, $port, $sock)
= @$params{qw(db_user db_pass db_host db_name db_port db_sock)};
$dsn .= ";port=$port" if $port;
$dsn .= ";mysql_socket=$sock" if $sock;
- my %attrs = (
- mysql_enable_utf8 => Bugzilla->params->{'utf8'},
-
- # Needs to be explicitly specified for command-line processes.
- mysql_auto_reconnect => 1,
- );
+ my %attrs = (mysql_enable_utf8 => 1);
# MySQL SSL options
my ($ssl_ca_file, $ssl_ca_path, $ssl_cert, $ssl_key) = @$params{
$attrs{'mysql_ssl_client_key'} = $ssl_key if $ssl_key;
}
- my $self = $class->db_new(
- {dsn => $dsn, user => $user, pass => $pass, attrs => \%attrs});
+ return {dsn => $dsn, user => $user, pass => $pass, attrs => \%attrs};
+}
+
+sub on_dbi_connected {
+ my ($class, $dbh) = @_;
# This makes sure that if the tables are encoded as UTF-8, we
# return their data correctly.
- $self->do("SET NAMES utf8") if Bugzilla->params->{'utf8'};
-
- # all class local variables stored in DBI derived class needs to have
- # a prefix 'private_'. See DBI documentation.
- $self->{private_bz_tables_locked} = "";
-
- # Needed by TheSchwartz
- $self->{private_bz_dsn} = $dsn;
-
- bless($self, $class);
+ my $charset = $class->utf8_charset;
+ my $collate = $class->utf8_collate;
+ $dbh->do("SET NAMES $charset COLLATE $collate");
# Check for MySQL modes.
my ($var, $sql_mode)
- = $self->selectrow_array("SHOW VARIABLES LIKE 'sql\\_mode'");
+ = $dbh->selectrow_array("SHOW VARIABLES LIKE 'sql\\_mode'");
# Disable ANSI and strict modes, else Bugzilla will crash.
if ($sql_mode) {
split(/,/, $sql_mode));
if ($sql_mode ne $new_sql_mode) {
- $self->do("SET SESSION sql_mode = ?", undef, $new_sql_mode);
+ $dbh->do("SET SESSION sql_mode = ?", undef, $new_sql_mode);
}
}
# Allow large GROUP_CONCATs (largely for inserting comments
# into bugs_fulltext).
- $self->do('SET SESSION group_concat_max_len = 128000000');
+ $dbh->do('SET SESSION group_concat_max_len = 128000000');
# MySQL 5.5.2 and older have this variable set to true, which causes
# trouble, see bug 870369.
- $self->do('SET SESSION sql_auto_is_null = 0');
-
- return $self;
+ $dbh->do('SET SESSION sql_auto_is_null = 0');
}
# when last_insert_id() is supported on MySQL by lowest DBI/DBD version
die install_string('mysql_innodb_disabled');
}
+ if ($self->utf8_charset eq 'utf8mb4') {
+ my %global = map {@$_}
+ @{$self->selectall_arrayref(q(SHOW GLOBAL VARIABLES LIKE 'innodb_%'))};
+ my $utf8mb4_supported
+ = $global{innodb_file_format} eq 'Barracuda'
+ && $global{innodb_file_per_table} eq 'ON'
+ && $global{innodb_large_prefix} eq 'ON';
+
+ die install_string('mysql_innodb_settings') unless $utf8mb4_supported;
+
+ my $tables = $self->selectall_arrayref('SHOW TABLE STATUS');
+ foreach my $table_status (@$tables) {
+ my ($table, undef, undef, $row_format) = @$table_status;
+ my $table_type = $table_status->[-1];
+ my $new_row_format = $self->default_row_format($table);
+ next if lc($table_type) eq 'view';
+ next if lc($new_row_format) eq 'compact';
+ next if lc($row_format) eq 'dynamic';
+ next if lc($row_format) eq 'compressed';
+ if (lc($new_row_format) ne lc($row_format)) {
+ print install_string(
+ 'mysql_row_format_conversion', {table => $table, format => $new_row_format}
+ ),
+ "\n";
+ $self->do(sprintf 'ALTER TABLE %s ROW_FORMAT=%s', $table, $new_row_format);
+ }
+ }
+ }
my ($sd_index_deleted, $longdescs_index_deleted);
my @tables = $self->bz_table_list_real();
'SELECT TABLE_NAME FROM information_schema.TABLES
WHERE TABLE_SCHEMA = ? AND ENGINE = ?', undef, $db_name, 'MyISAM'
);
- foreach my $should_be_myisam (Bugzilla::DB::Schema::Mysql::MYISAM_TABLES) {
- @$myisam_tables = grep { $_ ne $should_be_myisam } @$myisam_tables;
- }
if (scalar @$myisam_tables) {
print "Bugzilla now uses the InnoDB storage engine in MySQL for",
# This kind of situation happens when people create the database
# themselves, and if we don't do this they will get the big
# scary WARNING statement about conversion to UTF8.
- if ( !$self->bz_db_is_utf8
- && !@tables
- && (Bugzilla->params->{'utf8'} || !scalar keys %{Bugzilla->params}))
- {
+ unless ($self->bz_db_is_utf8) {
$self->_alter_db_charset_to_utf8();
}
# the table charsets.
#
# TABLE_COLLATION IS NOT NULL prevents us from trying to convert views.
+ my $charset = $self->utf8_charset;
+ my $collate = $self->utf8_collate;
my $non_utf8_tables = $self->selectrow_array(
"SELECT 1 FROM information_schema.TABLES
WHERE TABLE_SCHEMA = ? AND TABLE_COLLATION IS NOT NULL
- AND TABLE_COLLATION NOT LIKE 'utf8%'
- LIMIT 1", undef, $db_name
+ AND TABLE_COLLATION != ?
+ LIMIT 1", undef, $db_name, $collate
);
if (Bugzilla->params->{'utf8'} && $non_utf8_tables) {
}
}
- print "Converting table storage format to UTF-8. This may take a", " while.\n";
+ print
+ "Converting table storage format to $charset (collate $collate). This may take a while.\n";
foreach my $table ($self->bz_table_list_real) {
my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM $table");
$info_sth->execute();
# If this particular column isn't stored in utf-8
if ( $column->{Collation}
&& $column->{Collation} ne 'NULL'
- && $column->{Collation} !~ /utf8/)
+ && $column->{Collation} ne $collate)
{
my $name = $column->{Field};
- print "$table.$name needs to be converted to UTF-8...\n";
+ print "$table.$name needs to be converted to $charset (collate $collate)...\n";
# These will be automatically re-created at the end
# of checksetup.
my ($binary, $utf8) = ($sql_def, $sql_def);
my $type = $self->_bz_schema->convert_type($col_info->{TYPE});
$binary =~ s/(\Q$type\E)/$1 CHARACTER SET binary/;
- $utf8 =~ s/(\Q$type\E)/$1 CHARACTER SET utf8/;
+ $utf8 =~ s/(\Q$type\E)/$1 CHARACTER SET $charset COLLATE $collate/;
push(@binary_sql, "MODIFY COLUMN $name $binary");
push(@utf8_sql, "MODIFY COLUMN $name $utf8");
}
print "Converting the $table table to UTF-8...\n";
my $bin = "ALTER TABLE $table " . join(', ', @binary_sql);
- my $utf
- = "ALTER TABLE $table " . join(', ', @utf8_sql, 'DEFAULT CHARACTER SET utf8');
+ my $utf = "ALTER TABLE $table "
+ . join(', ', @utf8_sql, "DEFAULT CHARACTER SET $charset COLLATE $collate");
$self->do($bin);
$self->do($utf);
}
}
else {
- $self->do("ALTER TABLE $table DEFAULT CHARACTER SET utf8");
+ $self->do("ALTER TABLE $table DEFAULT CHARACTER SET $charset COLLATE $collate");
}
} # foreach my $table (@tables)
# a mysqldump.) So we have this change outside of the above block,
# so that it just happens silently if no actual *table* conversion
# needs to happen.
- if (Bugzilla->params->{'utf8'} && !$self->bz_db_is_utf8) {
+ unless ($self->bz_db_is_utf8) {
$self->_alter_db_charset_to_utf8();
}
}
}
+sub utf8_charset {
+ return 'utf8' unless Bugzilla->params->{'utf8'};
+ return Bugzilla->params->{'utf8'} eq 'utf8mb4' ? 'utf8mb4' : 'utf8';
+}
+
+sub utf8_collate {
+ my $charset = utf8_charset();
+ if ($charset eq 'utf8') {
+ return 'utf8_general_ci';
+ }
+ elsif ($charset eq 'utf8mb4') {
+ return 'utf8mb4_unicode_520_ci';
+ }
+ else {
+ croak "invalid charset: $charset";
+ }
+}
+
+sub default_row_format {
+ my ($class, $table) = @_;
+ my $charset = utf8_charset();
+ if ($charset eq 'utf8') {
+ return 'Compact';
+ }
+ elsif ($charset eq 'utf8mb4') {
+ my @no_compress = qw(
+ bug_user_last_visit
+ cc
+ email_rates
+ logincookies
+ token_data
+ tokens
+ ts_error
+ ts_exitstatus
+ ts_funcmap
+ ts_job
+ ts_note
+ user_request_log
+ votes
+ );
+ return 'Dynamic' if any { $table eq $_ } @no_compress;
+ return 'Compressed';
+ }
+ else {
+ croak "invalid charset: $charset";
+ }
+}
+
sub _alter_db_charset_to_utf8 {
my $self = shift;
my $db_name = Bugzilla->localconfig->{db_name};
- $self->do("ALTER DATABASE $db_name CHARACTER SET utf8");
+ my $charset = $self->utf8_charset;
+ my $collate = $self->utf8_collate;
+ $self->do("ALTER DATABASE $db_name CHARACTER SET $charset COLLATE $collate");
}
sub bz_db_is_utf8 {
my $self = shift;
- my $db_collation
+ my $db_charset
= $self->selectrow_arrayref("SHOW VARIABLES LIKE 'character_set_database'");
# First column holds the variable name, second column holds the value.
- return $db_collation->[1] =~ /utf8/ ? 1 : 0;
+ my $charset = $self->utf8_charset;
+ return $db_charset->[1] eq $charset ? 1 : 0;
}
package Bugzilla::DB::Oracle;
use 5.10.1;
-use strict;
-use warnings;
+use Moo;
-use parent qw(Bugzilla::DB);
+extends qw(Bugzilla::DB);
use DBD::Oracle;
use DBD::Oracle qw(:ora_types);
use constant MIN_LONG_READ_LEN => 32 * 1024;
use constant FULLTEXT_OR => ' OR ';
-sub new {
+sub BUILDARGS {
my ($class, $params) = @_;
my ($user, $pass, $host, $dbname, $port)
= @$params{qw(db_user db_pass db_host db_name db_port)};
LongReadLen =>
max(Bugzilla->params->{'maxattachmentsize'} || 0, MIN_LONG_READ_LEN) * 1024,
};
- my $self = $class->db_new(
- {dsn => $dsn, user => $user, pass => $pass, attrs => $attrs});
-
- # Needed by TheSchwartz
- $self->{private_bz_dsn} = $dsn;
+ return {dsn => $dsn, user => $user, pass => $pass, attrs => $attrs};
+}
- bless($self, $class);
+sub on_dbi_connected {
+ my ($class, $dbh) = @_;
# Set the session's default date format to match MySQL
- $self->do("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
- $self->do("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'");
- $self->do("ALTER SESSION SET NLS_LENGTH_SEMANTICS='CHAR'")
+ $dbh->do("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
+ $dbh->do("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'");
+ $dbh->do("ALTER SESSION SET NLS_LENGTH_SEMANTICS='CHAR'")
if Bugzilla->params->{'utf8'};
# To allow case insensitive query.
- $self->do("ALTER SESSION SET NLS_COMP='ANSI'");
- $self->do("ALTER SESSION SET NLS_SORT='BINARY_AI'");
- return $self;
+ $dbh->do("ALTER SESSION SET NLS_COMP='ANSI'");
+ $dbh->do("ALTER SESSION SET NLS_SORT='BINARY_AI'");
}
sub bz_last_key {
use strict;
use warnings;
-use parent -norequire, qw(DBI::st);
+use base -norequire, qw(DBI::st);
sub fetchrow_arrayref {
my $self = shift;
package Bugzilla::DB::Pg;
use 5.10.1;
-use strict;
-use warnings;
+use Moo;
use Bugzilla::Error;
use Bugzilla::Version;
use DBD::Pg;
# This module extends the DB interface via inheritance
-use parent qw(Bugzilla::DB);
+extends qw(Bugzilla::DB);
use constant BLOB_TYPE => {pg_type => DBD::Pg::PG_BYTEA};
-sub new {
+sub BUILDARGS {
my ($class, $params) = @_;
my ($user, $pass, $host, $dbname, $port)
= @$params{qw(db_user db_pass db_host db_name db_port)};
my $attrs = {pg_enable_utf8 => Bugzilla->params->{'utf8'}};
- my $self = $class->db_new(
- {dsn => $dsn, user => $user, pass => $pass, attrs => $attrs});
-
- # all class local variables stored in DBI derived class needs to have
- # a prefix 'private_'. See DBI documentation.
- $self->{private_bz_tables_locked} = "";
-
- # Needed by TheSchwartz
- $self->{private_bz_dsn} = $dsn;
-
- bless($self, $class);
-
- return $self;
+ return {dsn => $dsn, user => $user, pass => $pass, attrs => $attrs};
}
# if last_insert_id is supported on PostgreSQL by lowest DBI/DBD version
use Bugzilla::Error;
-use parent qw(Bugzilla::DB::Schema);
+use base qw(Bugzilla::DB::Schema);
# This is for column_info_to_column, to know when a tinyint is a
# boolean and when it's really a tinyint. This only has to be accurate
# as in their db-specific version, so no reverse mapping is needed.
};
-use constant MYISAM_TABLES => qw();
-
#------------------------------------------------------------------------------
sub _initialize {
#------------------------------------------------------------------------------
sub _get_create_table_ddl {
- # Extend superclass method to specify the MYISAM storage engine.
# Returns a "create table" SQL statement.
-
my ($self, $table) = @_;
-
- my $charset = Bugzilla->dbh->bz_db_is_utf8 ? "CHARACTER SET utf8" : '';
- my $type = grep($_ eq $table, MYISAM_TABLES) ? 'MYISAM' : 'InnoDB';
-
- my $ddl = $self->SUPER::_get_create_table_ddl($table);
- $ddl =~ s/CREATE TABLE (.*) \(/CREATE TABLE `$1` (/;
- $ddl .= " ENGINE = $type $charset";
-
- return $ddl;
-
+ my $charset = Bugzilla::DB::Mysql->utf8_charset;
+ my $collate = Bugzilla::DB::Mysql->utf8_collate;
+ my $row_format = Bugzilla::DB::Mysql->default_row_format($table);
+ my @parts = (
+ $self->SUPER::_get_create_table_ddl($table), 'ENGINE = InnoDB',
+ "CHARACTER SET $charset COLLATE $collate", "ROW_FORMAT=$row_format",
+ );
+ return join(' ', @parts);
} #eosub--_get_create_table_ddl
#------------------------------------------------------------------------------
my $sql = "CREATE ";
$sql .= "$index_type "
if ($index_type eq 'UNIQUE' || $index_type eq 'FULLTEXT');
- $sql .= "INDEX \`$index_name\` ON \`$table_name\` \("
+ $sql .= "INDEX \`$index_name\` ON $table_name \("
. join(", ", @$index_fields) . "\)";
return ($sql);
# We only create as utf8 if we have no params (meaning we're doing
# a new installation) or if the utf8 param is on.
- my $create_utf8
- = Bugzilla->params->{'utf8'} || !defined Bugzilla->params->{'utf8'};
- my $charset = $create_utf8 ? "CHARACTER SET utf8" : '';
- return ("CREATE DATABASE $name $charset");
+ my $charset = Bugzilla::DB::Mysql->utf8_charset;
+ my $collate = Bugzilla::DB::Mysql->utf8_collate;
+ return ("CREATE DATABASE $name CHARACTER SET $charset COLLATE $collate");
}
# MySQL has a simpler ALTER TABLE syntax than ANSI.
use strict;
use warnings;
-use parent qw(Bugzilla::DB::Schema);
+use base qw(Bugzilla::DB::Schema);
use Carp qw(confess);
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Bugzilla::DB::Schema);
+use base qw(Bugzilla::DB::Schema);
use Storable qw(dclone);
#------------------------------------------------------------------------------
use strict;
use warnings;
-use parent qw(Bugzilla::DB::Schema);
+use base qw(Bugzilla::DB::Schema);
use Bugzilla::Error;
use Bugzilla::Util qw(generate_random_password);
package Bugzilla::DB::Sqlite;
use 5.10.1;
-use strict;
-use warnings;
+use Moo;
-use parent qw(Bugzilla::DB);
+extends qw(Bugzilla::DB);
use Bugzilla::Constants;
use Bugzilla::Error;
# Constructor #
###############
-sub new {
+sub BUILDARGS {
my ($class, $params) = @_;
my $db_name = $params->{db_name};
sqlite_unicode => Bugzilla->params->{'utf8'},
};
- my $self
- = $class->db_new({dsn => $dsn, user => '', pass => '', attrs => $attrs});
+ return {dsn => $dsn, user => '', pass => '', attrs => $attrs};
+}
- # Needed by TheSchwartz
- $self->{private_bz_dsn} = $dsn;
+sub on_dbi_connected {
+ my ($class, $dbh) = @_;
my %pragmas = (
);
while (my ($name, $value) = each %pragmas) {
- $self->do("PRAGMA $name = $value");
+ $dbh->do("PRAGMA $name = $value");
}
- $self->sqlite_create_collation('bugzilla', \&_sqlite_collate_ci);
- $self->sqlite_create_function('position', 2, \&_sqlite_position);
- $self->sqlite_create_function('iposition', 2, \&_sqlite_position_ci);
+ $dbh->sqlite_create_collation('bugzilla', \&_sqlite_collate_ci);
+ $dbh->sqlite_create_function('position', 2, \&_sqlite_position);
+ $dbh->sqlite_create_function('iposition', 2, \&_sqlite_position_ci);
# SQLite has a "substr" function, but other DBs call it "SUBSTRING"
# so that's what we use, and I don't know of any way in SQLite to
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Error::EXPORT = qw(ThrowCodeError ThrowTemplateError ThrowUserError);
package Bugzilla::Extension::Foo
use strict;
- use parent qw(Bugzilla::Extension);
+ use base qw(Bugzilla::Extension);
our $VERSION = '0.02';
use constant NAME => 'Foo';
use strict;
use warnings;
-use parent qw(Exporter Bugzilla::Object);
+use base qw(Exporter Bugzilla::Object);
@Bugzilla::Field::EXPORT = qw(check_field get_field_id get_legal_field_values);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
+use base qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
use Bugzilla::Config qw(SetParam write_params);
use Bugzilla::Constants;
if (!defined *{"${package}::DB_TABLE"}) {
eval <<EOC;
package $package;
- use parent qw(Bugzilla::Field::Choice);
+ use base qw(Bugzilla::Field::Choice);
use constant DB_TABLE => '$field_name';
EOC
}
use Bugzilla::Constants;
use Bugzilla::Field;
-use parent qw(Bugzilla::Object Exporter);
+use base qw(Bugzilla::Object Exporter);
@Bugzilla::Flag::EXPORT = qw(SKIP_REQUESTEE_ON_ERROR);
###############################
use Email::Address;
use List::MoreUtils qw(uniq);
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
###############################
#### Initialization ####
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT = qw(
BZ_LIB
use IO::File;
use POSIX ();
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT = qw(
update_filesystem
create_htaccess
use Safe;
use Term::ANSIColor;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT_OK = qw(
read_localconfig
use List::Util qw(max);
use Term::ANSIColor;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT = qw(
REQUIRED_MODULES
OPTIONAL_MODULES
# If we don't find any of the above binaries in the normal PATH,
# these are extra places we look.
use constant APACHE_PATH => [qw(
- /usr/sbin
- /usr/local/sbin
- /usr/libexec
- /usr/local/libexec
- )];
+ /usr/sbin
+ /usr/local/sbin
+ /usr/libexec
+ /usr/local/libexec
+)];
# The below two constants are subroutines so that they can implement
# a hook. Other than that they are actually constants.
version => ($^V >= v5.13.3) ? '1.614' : '1.54'
},
+ {package => 'DBIx-Connector', module => 'DBIx::Connector', version => '0.56',},
+
+ {package => 'Moo', module => 'Moo', version => '2.003004',},
+
# 2.24 contains several useful text virtual methods.
{package => 'Template-Toolkit', module => 'Template', version => '2.24'},
my $blacklisted;
if ($vok && $params->{blacklist}) {
$blacklisted = grep($vnum =~ /$_/, @{$params->{blacklist}});
- $vok = 0 if $blacklisted;
+ $vok = 0 if $blacklisted;
}
if ($output) {
use Term::ANSIColor qw(colored);
use PerlIO;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT_OK = qw(
bin_loc
get_version_and_os
use warnings;
use Bugzilla::BugMail;
-BEGIN { eval "use parent qw(Bugzilla::Job::Mailer)"; }
+BEGIN { eval "use base qw(Bugzilla::Job::Mailer)"; }
sub work {
my ($class, $job) = @_;
use warnings;
use Bugzilla::Mailer;
-BEGIN { eval "use parent qw(TheSchwartz::Worker)"; }
+BEGIN { eval "use base qw(TheSchwartz::Worker)"; }
# The longest we expect a job to possibly take, in seconds.
use constant grab_for => 300;
# to write to it.
my $self = $class->SUPER::new(
databases => [{
- dsn => Bugzilla->dbh_main->{private_bz_dsn},
+ dsn => Bugzilla->dbh_main->dsn,
user => $lc->{db_user},
pass => $lc->{db_pass},
prefix => 'ts_',
use Bugzilla::Constants;
use Bugzilla::JobQueue;
use Bugzilla::Util qw(get_text);
-BEGIN { eval "use parent qw(Daemon::Generic)"; }
+BEGIN { eval "use base qw(Daemon::Generic)"; }
our $VERSION = BUGZILLA_VERSION;
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Error;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Email::MIME);
+use base qw(Email::MIME);
sub new {
my ($class, $msg) = @_;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker generate_email);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::Migrate);
+use base qw(Bugzilla::Migrate);
use Bugzilla::Constants;
use Bugzilla::Install::Util qw(indicate_progress);
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
+use base qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Util;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
use Bugzilla::Constants qw(ON_WINDOWS);
use Math::Random::ISAAC;
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::CGI;
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Search::EXPORT = qw(
IsValidQueryType
split_order_term
$field = FIELD_MAP->{$field} || $field;
my ($string_value, $orig_value);
- state $is_mysql = $dbh->isa('Bugzilla::DB::Mysql') ? 1 : 0;
if (ref $value eq 'ARRAY') {
@$value = grep { defined $_ and $_ ne '' } @$value;
return if !@$value;
$orig_value = join(',', @$value);
- if ($field eq 'longdesc' && $is_mysql) {
- @$value = map { _convert_unicode_characters($_) } @$value;
- }
$string_value = join(',', @$value);
}
else {
return if $value eq '';
$orig_value = $value;
- if ($field eq 'longdesc' && $is_mysql) {
- $value = _convert_unicode_characters($value);
- }
$string_value = $value;
}
$condition->translated(\%search_args);
}
-# XXX - This is a hack for MySQL which doesn't understand Unicode characters
-# above U+FFFF, see Bugzilla::Comment::_check_thetext(). This hack can go away
-# once we require MySQL 5.5.3 and use utf8mb4.
-sub _convert_unicode_characters {
- my $string = shift;
-
- # Perl 5.13.8 and older complain about non-characters.
- no warnings 'utf8';
- $string
- =~ s/([\x{10000}-\x{10FFFF}])/"\x{FDD0}[" . uc(sprintf('U+%04x', ord($1))) . "]\x{FDD1}"/eg;
- return $string;
-}
-
##################################
# do_search_function And Helpers #
##################################
use strict;
use warnings;
-use parent qw(Bugzilla::Search::Clause);
+use base qw(Bugzilla::Search::Clause);
use Bugzilla::Error;
use Bugzilla::Search::Condition qw(condition);
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT_OK = qw(condition);
sub new {
use List::MoreUtils qw(firstidx);
use Text::ParseWords qw(parse_line);
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Search::Quicksearch::EXPORT = qw(quicksearch);
# Custom mappings for some fields.
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::CGI;
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Email::Sender::Transport::Sendmail);
+use base qw(Email::Sender::Transport::Sendmail);
use Email::Sender::Failure;
# ChoiceInterface, because a bug status literally is a special type
# of Field::Choice, not just an object that happens to have the same
# methods.
-use parent qw(Bugzilla::Field::Choice Exporter);
+use base qw(Bugzilla::Field::Choice Exporter);
@Bugzilla::Status::EXPORT = qw(
BUG_STATE_OPEN
SPECIAL_STATUS_WORKFLOW_ACTIONS
use List::MoreUtils qw(firstidx);
use Scalar::Util qw(blessed);
-use parent qw(Template);
+use base qw(Template);
use constant FORMAT_TRIPLE => '%19s|%-28s|%-28s';
use constant FORMAT_3_SIZE => [19, 28, 28];
use strict;
use warnings;
-use parent qw(Template::Context);
+use base qw(Template::Context);
use Bugzilla::Hook;
use Scalar::Util qw(blessed);
use strict;
use warnings;
-use parent qw(Template::Plugin);
+use base qw(Template::Plugin);
use Bugzilla;
use strict;
use warnings;
-use parent qw(Template::Plugin);
+use base qw(Template::Plugin);
use Bugzilla::Constants;
use Bugzilla::Install::Util qw(template_include_path);
use File::Basename;
use Digest::SHA qw(hmac_sha256_base64);
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Token::EXPORT = qw(issue_api_token issue_session_token
check_token_data delete_token
use URI;
use URI::QueryParam;
-use parent qw(Bugzilla::Object Exporter);
+use base qw(Bugzilla::Object Exporter);
@Bugzilla::User::EXPORT = qw(is_available_username
login_to_id validate_password validate_password_check
USER_MATCH_MULTIPLE USER_MATCH_FAILED USER_MATCH_SUCCESS
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::User;
use Bugzilla::Util qw(generate_random_password trim);
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
# Module stuff
use strict;
use warnings;
-use parent qw(Bugzilla::User::Setting);
+use base qw(Bugzilla::User::Setting);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::User::Setting);
+use base qw(Bugzilla::User::Setting);
use Bugzilla::Constants;
use File::Spec::Functions;
use DateTime::TimeZone;
-use parent qw(Bugzilla::User::Setting);
+use base qw(Bugzilla::User::Setting);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT = qw(detect_platform detect_op_sys);
use Bugzilla::Field;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
@Bugzilla::Util::EXPORT = qw(trick_taint detaint_natural detaint_signed
html_quote url_quote xml_quote
css_class_quote html_light_quote
use strict;
use warnings;
-use parent qw(Bugzilla::Object Exporter);
+use base qw(Bugzilla::Object Exporter);
@Bugzilla::Version::EXPORT = qw(vers_cmp);
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Comment;
use Bugzilla::Comment::TagWeights;
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Bug;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Constants;
use Bugzilla::Util qw(datetime_from);
use Bugzilla::WebService::Util qw(validate filter_wants);
use strict;
use warnings;
-use parent qw (Bugzilla::WebService);
+use base qw (Bugzilla::WebService);
use Bugzilla::Classification;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
our @EXPORT = qw(
WS_ERROR_CODE
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Component;
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::WebService::Util qw(validate translate params_to_objects);
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Product;
use Bugzilla::User;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::WebService::Server::JSONRPC);
+use base qw(Bugzilla::WebService::Server::JSONRPC);
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-# We can't use "use parent" because XMLRPC::Serializer doesn't return
+# We can't use "use base" because XMLRPC::Serializer doesn't return
# a true value.
use XMLRPC::Lite;
our @ISA = qw(XMLRPC::Deserializer);
use Scalar::Util qw(blessed reftype);
-# We can't use "use parent" because XMLRPC::Serializer doesn't return
+# We can't use "use base" because XMLRPC::Serializer doesn't return
# a true value.
use XMLRPC::Lite;
our @ISA = qw(XMLRPC::Serializer);
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Constants;
use Bugzilla::Error;
use Storable qw(dclone);
use List::MoreUtils qw(any none);
-use parent qw(Exporter);
+use base qw(Exporter);
# We have to "require", not "use" this, because otherwise it tries to
# use features of Test::More during import().
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::Search::Saved;
use strict;
use warnings;
-use parent qw(Bugzilla::Object);
+use base qw(Bugzilla::Object);
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Pod::Simple::HTML);
+use base qw(Pod::Simple::HTML);
# Without this constant, HTMLBatch will throw undef warnings.
use constant VERSION => $Pod::Simple::HTML::VERSION;
use strict;
use warnings;
-use parent qw(Pod::Simple::HTMLBatch);
+use base qw(Pod::Simple::HTMLBatch);
# This is the same hack that HTMLBatch does to "import" this subroutine.
BEGIN { *esc = \&Pod::Simple::HTML::esc }
use strict;
use warnings;
-use parent qw(Bugzilla::Extension);
+use base qw(Bugzilla::Extension);
use Image::Magick;
use strict;
use warnings;
-use parent qw(Bugzilla::Extension);
+use base qw(Bugzilla::Extension);
use Bugzilla::Constants;
use Bugzilla::Error;
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Login);
+use base qw(Bugzilla::Auth::Login);
use constant user_can_create_account => 0;
use Bugzilla::Constants;
use strict;
use warnings;
-use parent qw(Bugzilla::Auth::Verify);
+use base qw(Bugzilla::Auth::Verify);
use Bugzilla::Constants;
# A verifier that always fails.
use 5.10.1;
use strict;
use warnings;
-use parent qw(Bugzilla::WebService);
+use base qw(Bugzilla::WebService);
use Bugzilla::Error;
use constant PUBLIC_METHODS => qw(
use strict;
use warnings;
-use parent qw(Bugzilla::Extension);
+use base qw(Bugzilla::Extension);
use constant MORE_SUB_CLASSES => qw(
Bugzilla::Extension::MoreBugUrl::BitBucket
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::BugUrl);
+use base qw(Bugzilla::BugUrl);
###############################
#### Methods ####
use strict;
use warnings;
-use parent qw(Bugzilla::Extension);
+use base qw(Bugzilla::Extension);
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::Field::Choice;
use strict;
use warnings;
-use parent qw(Bugzilla::Extension);
+use base qw(Bugzilla::Extension);
use Bugzilla::Bug;
use Bugzilla::BugMail;
use strict;
use warnings;
-use parent qw(Exporter);
+use base qw(Exporter);
@Support::Systemexec::EXPORT = qw(system exec);
sub system($$@) {
use warnings;
use lib 't';
-use parent qw(Exporter);
+use base qw(Exporter);
@Support::Templates::EXPORT
= qw(@languages @include_paths @english_default_include_paths
@referenced_files %actual_files $num_actual_files);
InnoDB is disabled in your MySQL installation.
Bugzilla requires InnoDB to be enabled.
Please enable it and then re-run checksetup.pl.
+END
+ mysql_innodb_settings => <<'END',
+Bugzilla requires the following MySQL InnoDB settings:
+innodb_file_format = Barracuda
+innodb_file_per_table = 1
+innodb_large_prefix = 1
END
mysql_index_renaming => <<'END',
We are about to rename old indexes. The estimated time to complete
it has begun. If you would like to cancel, press Ctrl-C now...
(Waiting 45 seconds...)
END
- mysql_utf8_conversion => <<'END',
+ mysql_row_format_conversion => "Converting ##table## to row format ##format##.",
+ mysql_utf8_conversion => <<'END',
WARNING: We are about to convert your table storage format to UTF-8. This
allows Bugzilla to correctly store and sort international characters.
However, if you have any non-UTF-8 data in your database,
# This test combines two field/operator combinations using AND in
# a single boolean chart.
package Bugzilla::Test::Search::AndTest;
-use parent qw(Bugzilla::Test::Search::OrTest);
+use base qw(Bugzilla::Test::Search::OrTest);
use Bugzilla::Test::Search::Constants;
use List::MoreUtils qw(all);
# More detailed information on each constant is available in the comments
# in this file.
package Bugzilla::Test::Search::Constants;
-use parent qw(Exporter);
+use base qw(Exporter);
use Bugzilla::Constants;
use Bugzilla::Util qw(generate_random_password);
# Tests like this are specified in CUSTOM_SEARCH_TESTS in
# Bugzilla::Test::Search::Constants.
package Bugzilla::Test::Search::CustomTest;
-use parent qw(Bugzilla::Test::Search::FieldTest);
+use base qw(Bugzilla::Test::Search::FieldTest);
use strict;
use warnings;
package Bugzilla::Test::Search::FieldTestNormal;
use strict;
use warnings;
-use parent qw(Bugzilla::Test::Search::FieldTest);
+use base qw(Bugzilla::Test::Search::FieldTest);
use Scalar::Util qw(blessed);
# This module represents the SQL Injection tests that get run on a single
# operator/field combination for Bugzilla::Test::Search.
package Bugzilla::Test::Search::InjectionTest;
-use parent qw(Bugzilla::Test::Search::FieldTest);
+use base qw(Bugzilla::Test::Search::FieldTest);
use strict;
use warnings;
# it to OrTest and AndTest, but without Moose there isn't much of an
# easy way to do that.
package Bugzilla::Test::Search::NotTest;
-use parent qw(Bugzilla::Test::Search::FieldTest);
+use base qw(Bugzilla::Test::Search::FieldTest);
use strict;
use warnings;
use Bugzilla::Test::Search::Constants;
# This test combines two field/operator combinations using OR in
# a single boolean chart.
package Bugzilla::Test::Search::OrTest;
-use parent qw(Bugzilla::Test::Search::FieldTest);
+use base qw(Bugzilla::Test::Search::FieldTest);
use Bugzilla::Test::Search::Constants;
use List::MoreUtils qw(all any uniq);