{"id":368,"date":"2018-03-01T03:06:21","date_gmt":"2018-03-01T03:06:21","guid":{"rendered":"http:\/\/info.juliusgoh.life\/?p=368"},"modified":"2019-10-25T03:12:00","modified_gmt":"2019-10-25T03:12:00","slug":"mysql-procedure-creation","status":"publish","type":"post","link":"https:\/\/info.juliusgoh.life\/?p=368","title":{"rendered":"Mysql Procedure creation"},"content":{"rendered":"<h1>Procedure Creation Example<\/h1>\n<pre>\r\nMariaDB [stress]> DELIMITER ;;\r\nMariaDB [stress]> CREATE PROCEDURE ABC()\r\n    -> BEGIN\r\n    -> WHILE 1\r\n    -> DO\r\n    -> SELECT COUNT(*) FROM stresstable;\r\n    -> DO SLEEP(1);\r\n    -> END WHILE;\r\n    -> END;;\r\n\r\nMariaDB [stress]> DELIMITER ;\r\nMariaDB [stress]> CALL ABC();\r\n\r\n<\/pre>\n<h1>Procedure Listing<\/h1>\n<pre>\r\n$ SHOW PROCEDURE STATUS;\r\n\r\nOR\r\n\r\n$ SELECT ROUTINE_SCHEMA,ROUTINE_NAME FROM information_schema.routines where routine_type = 'PROCEDURE';\r\n\r\n<\/pre>\n<h1>DELETE PROCEDURE<\/h1>\n<pre>\r\nDROP PROCEDURE{DATABASE_NAME}.{PROCEDURE_NAME};\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Procedure Creation Example MariaDB [stress]> DELIMITER ;; MariaDB [stress]> CREATE PROCEDURE ABC() -> BEGIN -> WHILE 1 -> DO -> SELECT COUNT(*) FROM stresstable; -> DO SLEEP(1); -> END WHILE; -> END;; MariaDB [stress]> DELIMITER ; MariaDB [stress]> CALL ABC(); Procedure Listing $ SHOW PROCEDURE STATUS; OR $ SELECT ROUTINE_SCHEMA,ROUTINE_NAME FROM information_schema.routines where routine_type = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":225,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/368"}],"collection":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368"}],"version-history":[{"count":5,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":605,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions\/605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/media\/225"}],"wp:attachment":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}