Re: ROW_COUNT() results in NULL from stored procedure
MAX(evID)+1 -- Will this Sproc be run by multiple connections at the 'same' time? If so, you probably have a bug in computing that id. Or maybe you have a BEGIN...COMMIT around the call to the sproc? Even so, you would need FOR UPDATE.
Better yet, use AUTO_INCREMENT instead of simulating it.
Another bug... SET @sql = CONCAT(@sql, "'",...,"',"); fails to escape the parameters. If any has "'" in it, you will get syntax errors. Also it is an open invitation to hackers to mess with your system.
The whole sproc is a lot of work to replace a single simple INSERT with AUTO_INCREMENT. Get rid of the Stored Procedure.
Subject
Views
Written By
Posted
4272
May 18, 2016 06:32PM
1116
May 18, 2016 10:06PM
1025
May 19, 2016 10:17AM
Re: ROW_COUNT() results in NULL from stored procedure
918
June 01, 2016 11:49AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.