title: I am creating a procedure seemingly correctly, however I am receiving a SQL syntax error
body: <p>The following code:</p>
  <pre><code>USE `securityMisconfigStealToken`;
  -- DELIMITER $$
  CREATE PROCEDURE `securityMisconfigStealToken`.`getToken`(IN theUserId VARCHAR(64))
  BEGIN
  DECLARE tokenExists INT;
  COMMIT;
  SELECT count(token) FROM `securityMisconfigStealToken`.`tokens` WHERE userId = theUserId INTO tokenExists;
  IF (tokenExists &lt; 1) THEN
          INSERT INTO tokens (userId, token) VALUES (theUserId, SHA2(CONCAT(RAND(), now()), 256));
          COMMIT;
  END IF;
  SELECT token FROM tokens WHERE userId = theUserId;
  END
  ;
  -- $$
  </code></pre>
  <p>Throws the exception:</p>
  <blockquote>
  <p>ERROR 1064 (42000) at line 996: You have an error in your SQL syntax;
  check the manual that corresponds to your MariaDB server version for
  the right syntax to use near '' at line 3</p>
  </blockquote>
  <p>I am currently using mariaDB version 10.5.12.</p>
  <p>The first line of code starts at line 994 and ends at 1008, however the error refers to syntax at line 3. I cannot seem to find at all why this code is throwing an error.</p>