Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Feedback for errors in Revision scripts #86

Open
x56mike opened this issue Apr 1, 2015 · 3 comments
Open

Feedback for errors in Revision scripts #86

x56mike opened this issue Apr 1, 2015 · 3 comments

Comments

@x56mike
Copy link

x56mike commented Apr 1, 2015

Thanks for a very handy tool. I'm using it with MariaDB with the MySQL connector.

I'm finding it frustrating that there is no feedback for sql errors in revision scripts. Yes, scripts should be tested first, and they are, but accidents happen.

I used to think that if the 'Revision applied' message did not appear I could assume something went wrong. If it appeared then all is fine. However I am noticing that the message will appear when some statements in the revision folder fail.

Please consider providing the sql errors when revisions are applied. Apologies if I'm missing something.

UPDATE:
I've noticed the 'Revision applied' message will specifically appear when I am trying to run a revision to a procedure. Everything in the revision file will run up to the DELIMITER $$ line, then stop.

UPDATE 2:
Many apologies, I should have updated to 1.1 before posting. I am now seeing sql errors when revision scripts have errors. However I still can not update a stored procedure - execution stops at the DELIMITER $$ line.

@victorstanciu
Copy link
Owner

This should be fixed in cbbf24c. Can you confirm please?

@x56mike
Copy link
Author

x56mike commented Jul 7, 2015

Thankyou victorstanciu for looking to this. This did not seem to fix the DELIMITER $$ problem.

Revision scripts which contain an update to a stored procedure and so contain the line "DELIMITER $$" will not execute past this line and will not report an error

Cheers,
x56mike

@x56mike
Copy link
Author

x56mike commented Oct 22, 2015

Finally motivated enough to look into this properly. Solution is to remove DELIMITER $$ from revision script.

PHP does not need this line, apparently. I'm not a PHP expert but it has to do with how PHP passes statements to the db.
(https://stackoverflow.com/questions/18409755/create-stored-procedures-with-pdo-in-php)

Problem now that revision scripts will not work in a client like Workbench but I can live with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants