Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ef04d1df
Commit
ef04d1df
authored
Mar 15, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 374024: Abstract-out isolation level in Bugzilla::DB so drivers can choose their own level
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
parent
11a25d2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
DB.pm
Bugzilla/DB.pm
+11
-2
No files found.
Bugzilla/DB.pm
View file @
ef04d1df
...
@@ -50,6 +50,7 @@ use Storable qw(dclone);
...
@@ -50,6 +50,7 @@ use Storable qw(dclone);
#####################################################################
#####################################################################
use
constant
BLOB_TYPE
=>
DBI::
SQL_BLOB
;
use
constant
BLOB_TYPE
=>
DBI::
SQL_BLOB
;
use
constant
ISOLATION_LEVEL
=>
'REPEATABLE READ'
;
# Set default values for what used to be the enum types. These values
# Set default values for what used to be the enum types. These values
# are no longer stored in localconfig. If we are upgrading from a
# are no longer stored in localconfig. If we are upgrading from a
...
@@ -876,7 +877,7 @@ sub bz_start_transaction {
...
@@ -876,7 +877,7 @@ sub bz_start_transaction {
# what we need in Bugzilla to be safe, for what we do.
# what we need in Bugzilla to be safe, for what we do.
# Different DBs have different defaults for their isolation
# Different DBs have different defaults for their isolation
# level, so we just set it here manually.
# level, so we just set it here manually.
$self
->
do
(
'SET TRANSACTION ISOLATION LEVEL
REPEATABLE READ'
);
$self
->
do
(
'SET TRANSACTION ISOLATION LEVEL
'
.
$self
->
ISOLATION_LEVEL
);
$self
->
{
private_bz_transaction_count
}
=
1
;
$self
->
{
private_bz_transaction_count
}
=
1
;
}
}
}
}
...
@@ -1198,13 +1199,21 @@ should be always preffered over hard-coding SQL commands.
...
@@ -1198,13 +1199,21 @@ should be always preffered over hard-coding SQL commands.
Subclasses of Bugzilla::DB are required to define certain constants. These
Subclasses of Bugzilla::DB are required to define certain constants. These
constants are required to be subroutines or "use constant" variables.
constants are required to be subroutines or "use constant" variables.
=over
4
=over
=item C<BLOB_TYPE>
=item C<BLOB_TYPE>
The C<\%attr> argument that must be passed to bind_param in order to
The C<\%attr> argument that must be passed to bind_param in order to
correctly escape a C<LONGBLOB> type.
correctly escape a C<LONGBLOB> type.
=item C<ISOLATION_LEVEL>
The argument that this database should send to
C<SET TRANSACTION ISOLATION LEVEL> when starting a transaction. If you
override this in a subclass, the isolation level you choose should
be as strict as or more strict than the default isolation level defined in
L<Bugzilla::DB>.
=back
=back
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment