Committer: ailyin
do not crash on errorsU trunk/bin/upgrading/update-db.pl
Modified: trunk/bin/upgrading/update-db.pl =================================================================== --- trunk/bin/upgrading/update-db.pl 2010-11-29 10:03:05 UTC (rev 17816) +++ trunk/bin/upgrading/update-db.pl 2010-11-29 10:50:06 UTC (rev 17817) @@ -120,6 +120,9 @@ next CLUSTER; } + $dbh->{'RaiseError'} = 0; + $dbh->{'PrintError'} = 1 if $LJ::IS_DEV_SERVER; + # reset everything %clustered_table = %table_exists = %table_unknown = %table_create = %table_drop = %post_create = @@ -205,6 +208,9 @@ if ($opt_pop) { $dbh = LJ::get_db_writer() or die "Couldn't get master handle for population."; + $dbh->{'RaiseError'} = 0; + $dbh->{'PrintError'} = 1 if $LJ::IS_DEV_SERVER; + populate_database(); } @@ -503,6 +509,8 @@ # therefore, let's reconnect LJ::end_request(); $dbh = LJ::get_db_writer(); + $dbh->{'RaiseError'} = 0; + $dbh->{'PrintError'} = 1 if $LJ::IS_DEV_SERVER; if ($LJ::IS_DEV_SERVER) { # now, delete any system layers that don't below (from previous imports?)