I finally got it done after spending an afternoon; I have to say that the process control of mysql is very poor!mysql的流程控制好差劲! 错误发生时经常抓取不到error,code直接赋值null,这样判断事物提交时被坑了一把; 文档里的抓取数据影响行数的功能没测通,输出结果始终是0,可能用法也不对吧,没找到正确姿势.
另外推荐个mysql存储过程调试工具 dbForge Studio for MySQL 使用时记得只在测试库上debugWhen errors occur, I often cannot capture error, code code> directly assigns the value null, so that it is judged that the thing is being tricked when submitting;
The function of grabbing data in the document to affect the number of rows has not been tested, and the output result is always 0 code>, maybe the usage is wrong, I couldn’t find the correct posture.🎜
🎜In addition, I recommend a mysql stored procedure debugging tool dbForge Studio for MySQL🎜When using it, remember to only debug on the test library, because it will debug the storage Add code to the process and create a new library to store debugging information in the database.🎜
declare exit handler for sqlexception
/Start transaction/
start transaction;
I finally got it done after spending an afternoon;
I have to say that the process control of
mysql
is very poor!mysql
的流程控制好差劲!错误发生时经常抓取不到
error
,code
直接赋值null
,这样判断事物提交时被坑了一把;文档里的抓取数据影响行数的功能没测通,输出结果始终是
0
,可能用法也不对吧,没找到正确姿势.另外推荐个
The function of grabbing data in the document to affect the number of rows has not been tested, and the output result is alwaysmysql
存储过程调试工具dbForge Studio for MySQL
使用时记得只在测试库上
debug
When errors occur, I often cannot captureerror
,code code> directly assigns the value
null
, so that it is judged that the thing is being tricked when submitting;0 code>, maybe the usage is wrong, I couldn’t find the correct posture.🎜 🎜In addition, I recommend a
mysql
stored procedure debugging tooldbForge Studio for MySQL
🎜When using it, remember to onlydebug
on the test library, because it will debug the storage Add code to the process and create a new library to store debugging information in the database.🎜