OSDN Git Service
(root)
/
newslash
/
newslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2037a8a
)
Model::Cowrapper: add integrety check to use_transaction()
author
hylom
<hylom@users.sourceforge.jp>
Fri, 9 Nov 2018 10:21:12 +0000
(19:21 +0900)
committer
hylom
<hylom@users.sourceforge.jp>
Fri, 9 Nov 2018 10:21:12 +0000
(19:21 +0900)
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
patch
|
blob
|
history
diff --git
a/src/newslash_web/lib/Newslash/Model/Cowrapper.pm
b/src/newslash_web/lib/Newslash/Model/Cowrapper.pm
index
298f519
..
bac2e11
100644
(file)
--- a/
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
+++ b/
src/newslash_web/lib/Newslash/Model/Cowrapper.pm
@@
-179,6
+179,10
@@
sub use_transaction {
my $self = shift;
my $dbh = shift;
+ if ($self->transaction_mode) {
+ die "already transaction started";
+ }
+
if ($dbh) {
$self->{_transactions} = 2;
$self->{_tr_dbh} = $dbh;