Issue 425 in flyway: flyway shows success even though creation of oracle procedure failed

103 views
Skip to first unread message

fly...@googlecode.com

unread,
Jan 31, 2013, 6:18:48 PM1/31/13
to flywa...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 425 by dyo...@gmail.com: flyway shows success even though
creation of oracle procedure failed
http://code.google.com/p/flyway/issues/detail?id=425

Oracle stored procedure failed to be created but status for execution of my
DDL script shows success. Can you add this to your list of bugs to fix?
Thank you.

## Configuration,
* flyway commandline-2.0.3
* Oracle 11gR2 client
* Oracle 11gR1 database

## procedure I'm creating,
$ cat db_2__proc.sql
create or replace procedure update_test
begin
update test set id=1;
end;
/
$

## Running flyway,
$ flyway.sh -configFile=testdb.properties info
Flyway (Command-line Tool) v.2.0.3


+----------------+----------------------------+---------------------+---------+
| Version | Description | Installed on |
State |
+----------------+----------------------------+---------------------+---------+
| 0 | init | 2013-01-31 15:04:41 |
Success |
| 1 | table | 2013-01-31 15:06:08 |
Success |
| 2 | proc | |
Pending |
+----------------+----------------------------+---------------------+---------+
$ flyway.sh -configFile=testdb.properties migrate
Flyway (Command-line Tool) v.2.0.3

Current schema version: 1
WARNING: outOfOrder mode is active. Migration run may not be reproducible.
Migrating to version 2
Successfully applied 1 migration (execution time 00:00.135s).
$ flyway.sh -configFile=testdb.properties info
Flyway (Command-line Tool) v.2.0.3


+----------------+----------------------------+---------------------+---------+
| Version | Description | Installed on |
State |
+----------------+----------------------------+---------------------+---------+
| 0 | init | 2013-01-31 15:04:41 |
Success |
| 1 | table | 2013-01-31 15:06:08 |
Success |
| 2 | proc | 2013-01-31 15:06:50 |
Success |
+----------------+----------------------------+---------------------+---------+

## Object created is invalid,
SQL> desc update_test
ERROR:
ORA-24372: invalid object for describe

SQL>

## Running script in sqlplus to verify errors,
SQL> create or replace procedure update_test
2 begin
3 update test set id=1;
4 end;
5 /

Warning: Procedure created with compilation errors.

SQL> select status from user_objects where object_name='UPDATE_TEST';

STATUS
-------
INVALID


fly...@googlecode.com

unread,
Feb 1, 2013, 2:04:50 AM2/1/13
to flywa...@googlegroups.com

Comment #1 on issue 425 by axel.fontai...@gmail.com: flyway shows
success even though creation of oracle procedure failed
http://code.google.com/p/flyway/issues/detail?id=425

Thanks for reporting this. It looks like it succeeded with a warning.
Currently Flyway only fails on errors.

I'm unsure about the consequences of failing on all warnings (maybe just a
selective list to start?). Must be investigated.

Cheers
Axel

fly...@googlecode.com

unread,
Feb 1, 2013, 2:47:27 AM2/1/13
to flywa...@googlegroups.com

Comment #2 on issue 425 by dyo...@gmail.com: flyway shows success even
though creation of oracle procedure failed
http://code.google.com/p/flyway/issues/detail?id=425

Package/procedure/function can't be used if compilation failed. Return
code for this particular error is 103.

SQL> create or replace procedure update_test
2 begin
3 update test set id=1;
4 end;
5 /

Warning: Procedure created with compilation errors.

SQL> select message_number,text from user_errors where name='UPDATE_TEST'
and type='PROCEDURE';

MESSAGE_NUMBER
--------------
TEXT
--------------------------------------------------------------------------------
103
PLS-00103: Encountered the symbol "BEGIN" when expecting one of the
following:

( ; is with authid as cluster compress order using compiled
wrapped external deterministic parallel_enable pipelined
result_cache
The symbol "is" was substituted for "BEGIN" to continue.

fly...@googlecode.com

unread,
Jun 25, 2013, 7:18:20 AM6/25/13
to flywa...@googlegroups.com
Updates:
Status: Migrated

Comment #3 on issue 425 by axel.fontai...@gmail.com: flyway shows
success even though creation of oracle procedure failed
http://code.google.com/p/flyway/issues/detail?id=425

Migrated to GitHub: https://github.com/flyway/flyway/issues/432

To everyone who starred this issue: please leave a +1 comment on the linked
GitHub issue

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages