diff options
author | Perl Tidy <perltidy@bugzilla.org> | 2019-01-31 20:50:06 -0500 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2019-01-31 21:02:46 -0500 |
commit | f91e240aac65936bc9dee0f926cd6f1021f48fe0 (patch) | |
tree | 596aa9893d4526e646b9a64fd6c65706c8dd3340 /Bugzilla/DB | |
parent | add perl-fmt script (diff) | |
download | bugzilla-f91e240aac65936bc9dee0f926cd6f1021f48fe0.tar.gz bugzilla-f91e240aac65936bc9dee0f926cd6f1021f48fe0.tar.bz2 bugzilla-f91e240aac65936bc9dee0f926cd6f1021f48fe0.zip |
no bug - perltidy again, using the latest release
blame jeff
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r-- | Bugzilla/DB/Mysql.pm | 14 | ||||
-rw-r--r-- | Bugzilla/DB/Oracle.pm | 8 | ||||
-rw-r--r-- | Bugzilla/DB/Schema.pm | 12 | ||||
-rw-r--r-- | Bugzilla/DB/Schema/Mysql.pm | 2 | ||||
-rw-r--r-- | Bugzilla/DB/Schema/Oracle.pm | 2 | ||||
-rw-r--r-- | Bugzilla/DB/Schema/Sqlite.pm | 2 | ||||
-rw-r--r-- | Bugzilla/DB/Sqlite.pm | 2 |
7 files changed, 21 insertions, 21 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 96a1fcb21..a58d88df4 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -283,7 +283,7 @@ sub bz_explain { $i++; } - my $first_row = sprintf($format_string, @$columns); + my $first_row = sprintf($format_string, @$columns); my @explain_rows = ($first_row, '-' x length($first_row)); while (my $row = $sth->fetchrow_arrayref) { my @fixed = map { defined $_ ? $_ : 'NULL' } @$row; @@ -328,7 +328,7 @@ sub bz_setup_database { # This parameter is not yet defined when the DB is being built for # the very first time. The code below still works properly, however, # because the default maxattachmentsize is smaller than $min_max_allowed. - my $max_attachment = (Bugzilla->params->{'maxattachmentsize'} || 0) * 1024; + my $max_attachment = (Bugzilla->params->{'maxattachmentsize'} || 0) * 1024; my $needed_max_allowed = max($min_max_allowed, $max_attachment); if ($current_max_allowed < $needed_max_allowed) { warn install_string('max_allowed_packet', @@ -737,7 +737,7 @@ sub bz_setup_database { 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 utf8/; push(@binary_sql, "MODIFY COLUMN $name $binary"); push(@utf8_sql, "MODIFY COLUMN $name $utf8"); } @@ -809,13 +809,13 @@ sub bz_setup_database { # looks like. So we remove defaults from columns that aren't supposed # to have them sub _fix_defaults { - my $self = shift; + my $self = shift; my $maj_version = substr($self->bz_server_version, 0, 1); return if $maj_version < 5; # The oldest column that could have this problem is bugs.assigned_to, # so if it doesn't have the problem, we just skip doing this entirely. - my $assi_def = $self->_bz_raw_column_info('bugs', 'assigned_to'); + my $assi_def = $self->_bz_raw_column_info('bugs', 'assigned_to'); my $assi_default = $assi_def->{COLUMN_DEF}; # This "ne ''" thing is necessary because _raw_column_info seems to @@ -834,7 +834,7 @@ sub _fix_defaults { # Get the exact default from the database without any # "fixing" by bz_column_info_real. - my $raw_info = $self->_bz_raw_column_info($table, $column); + my $raw_info = $self->_bz_raw_column_info($table, $column); my $raw_default = $raw_info->{COLUMN_DEF}; if (defined $raw_default) { if ($raw_default eq '') { @@ -856,7 +856,7 @@ sub _fix_defaults { print "Fixing defaults...\n"; foreach my $table (reverse sort keys %fix_columns) { my @alters = map("ALTER COLUMN $_ DROP DEFAULT", @{$fix_columns{$table}}); - my $sql = "ALTER TABLE $table " . join(',', @alters); + my $sql = "ALTER TABLE $table " . join(',', @alters); $self->do($sql); } } diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 337a0b5ba..930270ccc 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -310,7 +310,7 @@ sub adjust_statement { # Oracle requires a FROM clause in all SELECT statements, so append # "FROM dual" to queries without one (e.g., "SELECT NOW()") my $is_select = ($part =~ m/^\s*SELECT\b/io); - my $has_from = ($part =~ m/\bFROM\b/io) if $is_select; + my $has_from = ($part =~ m/\bFROM\b/io) if $is_select; # Oracle includes the time in CURRENT_DATE. $part =~ s/\bCURRENT_DATE\b/TRUNC(CURRENT_DATE)/io; @@ -669,7 +669,7 @@ sub bz_setup_database { # triggers ourselves. if ($def->{TYPE} =~ /SERIAL/i) { my $sequence = "${table}_${column}_SEQ"; - my $exists = $self->selectrow_array($sth, undef, $sequence); + my $exists = $self->selectrow_array($sth, undef, $sequence); if (!$exists) { my @sql = $self->_get_create_seq_ddl($table, $column); $self->do($_) foreach @sql; @@ -688,7 +688,7 @@ sub bz_setup_database { $to_table = 'tag'; } if ($update =~ /CASCADE/i) { - my $trigger_name = uc($fk_name . "_UC"); + my $trigger_name = uc($fk_name . "_UC"); my $exist_trigger = $self->selectcol_arrayref($sth, undef, $trigger_name); if (@$exist_trigger) { $self->do("DROP TRIGGER $trigger_name"); @@ -713,7 +713,7 @@ sub bz_setup_database { } # Drop the trigger which causes bug 541553 - my $trigger_name = "PRODUCTS_MILESTONEURL"; + my $trigger_name = "PRODUCTS_MILESTONEURL"; my $exist_trigger = $self->selectcol_arrayref($sth, undef, $trigger_name); if (@$exist_trigger) { $self->do("DROP TRIGGER $trigger_name"); diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 4fc9ce8e2..0ca4a386f 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -2048,7 +2048,7 @@ sub _column_fks_to_ddl { my ($self, $table, $column_fks) = @_; my @ddl; foreach my $column (keys %$column_fks) { - my $def = $column_fks->{$column}; + my $def = $column_fks->{$column}; my $fk_string = $self->get_fk_ddl($table, $column, $def); push(@ddl, $fk_string); } @@ -2147,7 +2147,7 @@ sub get_table_columns { sub get_table_indexes_abstract { my ($self, $table) = @_; my $table_def = $self->get_table_abstract($table); - my %indexes = @{$table_def->{INDEXES} || []}; + my %indexes = @{$table_def->{INDEXES} || []}; return \%indexes; } @@ -2217,7 +2217,7 @@ sub _get_create_table_ddl { my $finfo = shift(@fields); push(@col_lines, "\t$field\t" . $self->get_type_ddl($finfo)); if ($self->FK_ON_CREATE and $finfo->{REFERENCES}) { - my $fk = $finfo->{REFERENCES}; + my $fk = $finfo->{REFERENCES}; my $fk_ddl = $self->get_fk_ddl($table, $field, $fk); push(@fk_lines, $fk_ddl); } @@ -2352,7 +2352,7 @@ sub get_alter_column_ddl { my ($table, $column, $new_def, $set_nulls_to) = @_; my @statements; - my $old_def = $self->get_column_abstract($table, $column); + my $old_def = $self->get_column_abstract($table, $column); my $specific = $self->{db_specific}; # If the types have changed, we have to deal with that. @@ -2711,7 +2711,7 @@ sub delete_column { my ($self, $table, $column) = @_; my $abstract_fields = $self->{abstract_schema}{$table}{FIELDS}; - my $name_position = firstidx { $_ eq $column } @$abstract_fields; + my $name_position = firstidx { $_ eq $column } @$abstract_fields; die "Attempted to delete nonexistent column ${table}.${column}" if $name_position == -1; @@ -2859,7 +2859,7 @@ sub _set_object { sub delete_index { my ($self, $table, $name) = @_; - my $indexes = $self->{abstract_schema}{$table}{INDEXES}; + my $indexes = $self->{abstract_schema}{$table}{INDEXES}; my $name_position = firstidx { $_ eq $name } @$indexes; die "Attempted to delete nonexistent index $name on the $table table" if $name_position == -1; diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm index 0af73cc8f..4c0d43523 100644 --- a/Bugzilla/DB/Schema/Mysql.pm +++ b/Bugzilla/DB/Schema/Mysql.pm @@ -178,7 +178,7 @@ sub get_create_database_sql { # MySQL has a simpler ALTER TABLE syntax than ANSI. sub get_alter_column_ddl { my ($self, $table, $column, $new_def, $set_nulls_to) = @_; - my $old_def = $self->get_column($table, $column); + my $old_def = $self->get_column($table, $column); my %new_def_copy = %$new_def; if ($old_def->{PRIMARYKEY} && $new_def->{PRIMARYKEY}) { diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm index 0cf2b6c4b..416e9204b 100644 --- a/Bugzilla/DB/Schema/Oracle.pm +++ b/Bugzilla/DB/Schema/Oracle.pm @@ -228,7 +228,7 @@ sub get_alter_column_ddl { my ($self, $table, $column, $new_def, $set_nulls_to) = @_; my @statements; - my $old_def = $self->get_column_abstract($table, $column); + my $old_def = $self->get_column_abstract($table, $column); my $specific = $self->{db_specific}; # If the types have changed, we have to deal with that. diff --git a/Bugzilla/DB/Schema/Sqlite.pm b/Bugzilla/DB/Schema/Sqlite.pm index 73ee7cfc5..57361d2bb 100644 --- a/Bugzilla/DB/Schema/Sqlite.pm +++ b/Bugzilla/DB/Schema/Sqlite.pm @@ -288,7 +288,7 @@ sub get_rename_column_ddl { sub get_add_fks_sql { my ($self, $table, $column_fks) = @_; my @clauses = $self->_sqlite_table_lines($table); - my @add = $self->_column_fks_to_ddl($table, $column_fks); + my @add = $self->_column_fks_to_ddl($table, $column_fks); push(@clauses, @add); return $self->_sqlite_alter_schema($table, \@clauses); } diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm index 68180414c..c180fd0d7 100644 --- a/Bugzilla/DB/Sqlite.pm +++ b/Bugzilla/DB/Sqlite.pm @@ -250,7 +250,7 @@ sub bz_setup_database { # If we created TheSchwartz tables with COLLATE bugzilla (during the # 4.1.x development series) re-create them without it. - my @tables = $self->bz_table_list(); + my @tables = $self->bz_table_list(); my @ts_tables = grep {/^ts_/} @tables; my $drop_ok; foreach my $table (@ts_tables) { |