0

Whenever MySql encounters an error, it stops processing, even if there are more statements following. I need it to report errors but continue processing the remaining statements. I read in http://dev.mysql.com/doc/mysqltest/2.0/en/writing-tests-expecting-errors.html that you can use --error but MySql just says I have a syntax error.

For example, this stored procedure which adds a name to a unique column should cause a 1062 error...

...
call AddName('Joe');
--error 1062
call AddName('Joe');
...

...but MySql just points out the line number and says syntax error near '--error 1062 call AddName('Joe');'

It's also worth noting that comments starting with "--" don't seem to register as comments. I imagine that might be related.

Thanks in advance.

Devsman
  • 1
  • 1
  • 2
  • It looks like you're trying to use something intended for the test framework, as explained here: http://dev.mysql.com/doc/mysqltest/2.0/en/writing-tests-expecting-errors.html – Klazen108 Oct 26 '13 at 04:43
  • Right you are! I saw that article and it didn't even cross my mind that such thing might exist. Thanks. – Devsman Oct 27 '13 at 03:22

0 Answers0