[Rt-commit] rt branch, 4.2/oracle-fixes, created. rt-4.2.0-143-ga2314ce
Alex Vandiver
alexmv at bestpractical.com
Tue Nov 12 21:05:53 EST 2013
The branch, 4.2/oracle-fixes has been created
at a2314ce8b705b9af0114ba3e1bf5faad9dfcaf30 (commit)
- Log -----------------------------------------------------------------
commit e50dedde9e2ac8118f5a08f8412895ba415922a2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 19:01:28 2013 -0500
Update MaxAttachmentSize option to document its other use
This dual-meaning of MaxAttachmentSize was introduced in eeb5a70, in
3.0.10.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 5ec562c..22d6ddf 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -370,11 +370,14 @@ Set($StoreLoops, undef);
C<$MaxAttachmentSize> sets the maximum size (in bytes) of attachments
stored in the database. This setting is irrelevant unless one of
-$TruncateLongAttachments or $DropLongAttachments (below) are set.
+$TruncateLongAttachments or $DropLongAttachments (below) are set, B<OR>
+the database is stored in Oracle. On Oracle, attachments larger than
+this can be fully stored, but will be truncated to this length when
+read.
=cut
-Set($MaxAttachmentSize, 10_000_000);
+Set($MaxAttachmentSize, 10_000_000); # 10M
=item C<$TruncateLongAttachments>
commit fd66493495acde6a321fd3e560a01002284a198b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 19:07:29 2013 -0500
Increase maximum session size to match maximum attachment size
Apache::Session::Oracle defaults the maximum session size to 8k, using
LongReadLen; this is insufficient for many RT sessions. Increase the
size of Apache::Session::Oracle's LongReadLen to match LongReadLen as it
is defined in core RT -- as $MaxAttachmentSize.
diff --git a/lib/RT/Interface/Web/Session.pm b/lib/RT/Interface/Web/Session.pm
index f2dd603..ee685ac 100644
--- a/lib/RT/Interface/Web/Session.pm
+++ b/lib/RT/Interface/Web/Session.pm
@@ -131,6 +131,8 @@ sub Attributes {
Transaction => 1,
};
}
+ $res->{LongReadLen} = RT->Config->Get('MaxAttachmentSize')
+ if $class->isa('Apache::Session::Oracle');
return $res;
}
commit 61fb2de893bcb348cb18fd23b1b5f33226f82d7c
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 19:42:08 2013 -0500
Since ede2c65, Oracle has a Users1 index, not Users2
diff --git a/t/api/db_indexes.t b/t/api/db_indexes.t
index 947a59c..3c305d8 100644
--- a/t/api/db_indexes.t
+++ b/t/api/db_indexes.t
@@ -17,11 +17,7 @@ note "test handle->Indexes method";
my %indexes = $handle->Indexes;
ok grep $_ eq 'tickets1', @{ $indexes{'tickets'} };
ok grep $_ eq 'tickets2', @{ $indexes{'tickets'} };
- if ($db_type eq 'Oracle') {
- ok grep $_ eq 'users2', @{ $indexes{'users'} };
- } else {
- ok grep $_ eq 'users1', @{ $indexes{'users'} };
- }
+ ok grep $_ eq 'users1', @{ $indexes{'users'} };
ok grep $_ eq 'users4', @{ $indexes{'users'} };
}
commit e2d64e7561c6cded7a3d15789d16ebc300542d3f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 20:03:10 2013 -0500
Ensure that reports' entries are sorted as expected
diff --git a/t/charts/basics.t b/t/charts/basics.t
index 306eaa5..0f93e5a 100644
--- a/t/charts/basics.t
+++ b/t/charts/basics.t
@@ -26,6 +26,7 @@ use_ok 'RT::Report::Tickets';
GroupBy => ['Status'],
Function => ['COUNT'],
);
+ $report->SortEntries;
my @colors = RT->Config->Get("ChartColors");
my $expected = {
diff --git a/t/charts/compound-sql-function.t b/t/charts/compound-sql-function.t
index 96000fa..3e6a3fd 100644
--- a/t/charts/compound-sql-function.t
+++ b/t/charts/compound-sql-function.t
@@ -33,6 +33,7 @@ use_ok 'RT::Report::Tickets';
GroupBy => ['Queue'],
Function => ['ALL(Created-Resolved)'],
);
+ $report->SortEntries;
my @colors = RT->Config->Get("ChartColors");
my $expected = {
diff --git a/t/charts/group-by-cf.t b/t/charts/group-by-cf.t
index 12296b8..f6bfb35 100644
--- a/t/charts/group-by-cf.t
+++ b/t/charts/group-by-cf.t
@@ -29,6 +29,7 @@ use_ok 'RT::Report::Tickets';
GroupBy => ["CF.{$cfid}"], # TODO: CF.{Name} is not supported at the moment
Function => ['COUNT'],
);
+ $report->SortEntries;
my @colors = RT->Config->Get("ChartColors");
my $expected = {
commit 0fdcbeebff9f9c4440af7d8d4438661ec3f720cd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 20:16:28 2013 -0500
Provide a ticket subject to squash '' -> NULL -> undef warnings on Oracle
diff --git a/t/web/attachments.t b/t/web/attachments.t
index 0b8a5ea..0ae407d 100644
--- a/t/web/attachments.t
+++ b/t/web/attachments.t
@@ -369,6 +369,7 @@ diag "create with attachment";
$m->form_name('TicketCreate');
$m->field('Attach', FaviconFile);
+ $m->field('Subject', 'Subject');
$m->field('Content', 'Message');
ok($m->current_form->find_input('AddMoreAttach'), "more than one attachment");
$m->submit;
diff --git a/t/web/cf_groupings.t b/t/web/cf_groupings.t
index a59cd99..0a40f71 100644
--- a/t/web/cf_groupings.t
+++ b/t/web/cf_groupings.t
@@ -44,6 +44,7 @@ my %location = (
my $prefix = 'Object-RT::Ticket--CustomField:';
my $dom = $m->dom;
$m->form_name('TicketCreate');
+ $m->field("Subject", "CF grouping test");
for my $grouping (@groupings) {
my $input_name = $prefix . "$grouping-$CF{$grouping}-Value";
commit a2314ce8b705b9af0114ba3e1bf5faad9dfcaf30
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Nov 12 20:57:36 2013 -0500
Switch from "use base" to a method which can run more than once
RT::Handle->FinalizeDatabaseType is called when the package is
require'd, thanks to the final lines of RT::Handle. This means that it
is always called in RT::Test->bookstrap_db, which is always called on
'use RT::Test'. Furthermore, "use base ..." will only have an effect
_once_. As such, in t/web/install.t, the "SQLite" handle is actually
still an DBIx::SearchBuilder::Handle::Oracle despite DatabaseType being
SQLite. This leads to the SystemDSN being
dbi:SQLite:sid=/path/to/rt4test_install_xxx;host=hostname;port=1521
which fares about as well as you might expect.
Switch to setting the parentage via an explicit require and @ISA, which
can be called more than once.
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 4b3e5dc..9a481a9 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -83,17 +83,17 @@ L<DBIx::SearchBuilder::Handle>, using the C<DatabaseType> configuration.
=cut
sub FinalizeDatabaseType {
- eval {
- use base "DBIx::SearchBuilder::Handle::". RT->Config->Get('DatabaseType');
- };
-
my $db_type = RT->Config->Get('DatabaseType');
- if ($@) {
+ my $package = "DBIx::SearchBuilder::Handle::$db_type";
+
+ unless (eval "require $package; 1;") {
die "Unable to load DBIx::SearchBuilder database handle for '$db_type'.\n".
"Perhaps you've picked an invalid database type or spelled it incorrectly.\n".
$@;
}
+ @RT::Handle::ISA = ($package);
+
# We use COLLATE NOCASE to enforce case insensitivity on the normally
# case-sensitive SQLite, LOWER() approach works, but lucks performance
# due to absence of functional indexes
-----------------------------------------------------------------------
More information about the rt-commit
mailing list