Open vectro opened 4 months ago
Oh man, that's wild. Would WHENEVER SQLERROR EXIT FAILURE
fix it? The Exasol engine uses WHENEVER SQLERROR EXIT 4
instead. I have no clue what's right for either of these cases TBH 😂
It seems that on UNIX at least, FAILURE
gives an exit status of 1. I think that would fix this bug.
This is wild. Maybe should do EXIT 4
, if only because in some places Sqitch thinks of error code 1 as more of a warning. Not as much as it used to, but still…
On Oracle, Sqitch runs the SQL*Plus command
WHENEVER SQLERROR EXIT SQL.SQLCODE
, so that we can detect errors. However, on UNIX, SQL*Plus will return the actual error code modulo 256, which means the application can return zero exit status if the error code is a multiple of 256.For example, if Sqitch tries to deploy a script creating a table with too many columns, causing error ORA-01792: maximum number of columns in a table or view is 1000, SQL*Plus will still exit with zero exit status (because 1792 mod 256 = 0), so Sqitch will not detect the error.