- Timestamp:
- 2018-11-09T19:13:32+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm
r32591 r32592 34 34 use GreenstoneXMLPlugout; 35 35 use docprint; 36 use gs sql;36 use gsmysql; 37 37 38 38 use DBI; # the central package for this plugout … … 170 170 }; 171 171 172 my $gs_sql = new gs sql($db_params);172 my $gs_sql = new gsmysql($db_params); 173 173 174 174 # if autocommit is set, there's no rollback support … … 192 192 } 193 193 194 #die("@@@@ TEST. Connected successfully. Testing gs sql::destructor.\n"); # WORKS194 #die("@@@@ TEST. Connected successfully. Testing gsmysql::destructor.\n"); # WORKS 195 195 196 196 my $db_name = $self->{'site'} || "greenstone2"; # one database per GS3 site, for GS2 the db is called greenstone2 … … 212 212 # This is fatal for the plugout, let's terminate here after disconnecting again 213 213 # PrintError would already have displayed the warning message on load fail 214 # And on die() perl will call gs sql destroy which will ensure a disconnect() from db214 # And on die() perl will call gsmysql destroy which will ensure a disconnect() from db 215 215 #$gs_sql->force_disconnect_from_db(); # disconnect_from_db() will issue a warning on error 216 216 die("Could not use db $db_name and/or prepare its tables. Can't proceed.\n"); … … 237 237 238 238 # Important to call finished(): 239 # it will disconnect from db if this is the last gs sql instance,239 # it will disconnect from db if this is the last gsmysql instance, 240 240 # and it will commit to db before disconnecting if rollbback_on_cancel turned on 241 241 $self->{'gs_sql'}->finished();
Note:
See TracChangeset
for help on using the changeset viewer.