http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13068

--- Comment #65 from M. de Rooy <[email protected]> ---
> 7/ In TRACK mode, given the following file:
>   1 use Modern::Perl;
>   2 use C4::Context;
>   3 my $dbh = C4::Context->dbh;
>   4 $dbh->do("delete from foo");
> I executed  perl installer/data/mysql/updatedatabase.pl
> and I got
> DBD::mysql::db do failed: Table 'koha.foo' doesn't exist
> at /home/koha/src/installer/data/mysql/atomicupdate/test3.pl line 4.
> Dev upgrade test3.pl done
> The filename is appended to _localatomicupdates, it seems it should not, 
> could you confirm?

Yes, I can reproduce this (does not depend on the mode). Problem here is if the
db rev does not care about the errors raised, the calling program
(updatedatabase) does not see them any more.
Your last statement $dbh->do returns undef to the caller. But when you are back
in updatedatabase, the $! and $@ are not set any more. (Note that if you had a
trailing 1; in your file, I even would have received a 1.)
In this case I assume everything is fine and I append your file to the pref. I
agree that we ideally should not. But how should we catch this in a simple and
elegant way?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to