You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following section of the lab writeup was confusing. My group spent a lot of time wondering why the function definition would terminate after writing so many lines.
Except that the ; is interpreted by the mariaDB client incorrectly. bangbang You need to change the command delimiter first:
DELIMITER //
CREATE FUNCTION FortyTwo() RETURNS TINYINT DETERMINISTIC
BEGIN
DECLARE x TINYINT;
SET x = 42;
RETURN x;
END
//
DELIMITER ;
Clarification on how "the ; is interpreted by the mariaDB client incorrectly" would be useful. I would say something along the lines of this StackOverflow user.
Additionally, a mention of how the delimiter declaration is something that affects not just the function definition process but all future commands would be good. That would establish why "DELIMITER ;" needs to be called at the end, because even after we sort of understood why "DELIMITER //" was declared, we were still flailing around with terminating other commands because we never changed it back to a semicolon.
The text was updated successfully, but these errors were encountered:
The following section of the lab writeup was confusing. My group spent a lot of time wondering why the function definition would terminate after writing so many lines.
Clarification on how "the ; is interpreted by the mariaDB client incorrectly" would be useful. I would say something along the lines of this StackOverflow user.
Additionally, a mention of how the delimiter declaration is something that affects not just the function definition process but all future commands would be good. That would establish why "DELIMITER ;" needs to be called at the end, because even after we sort of understood why "DELIMITER //" was declared, we were still flailing around with terminating other commands because we never changed it back to a semicolon.
The text was updated successfully, but these errors were encountered: