can anybody assist me with the following procedure?
it can compile and works when i do any of the following:
CALL ACTIVATE_ACCOUN T('')
CALL ACTIVATE_ACCOUN T('123')
but when i do a
CALL ACTIVATE_ACCOUN T('0394df...... ') <-- forty alnum chars long, the
server hangs as in infinite loop. (the pc doesn't hang)
it seems that any forty character long input produces the error.
CREATE PROCEDURE ACTIVATE_ACCOUN T(IN p_uid CHAR(40))
BEGIN
IF(p_uid REGEXP '^[a-zA-Z0-9]{40}$') THEN
BEGIN
UPDATE
account,
member
SET
activated = 1
WHERE
account.id = member.account_ id
AND
SHA1(CONCAT(acc ount_id, email_address)) = p_uid AND activated = 0;
END;
END IF;
END
it can compile and works when i do any of the following:
CALL ACTIVATE_ACCOUN T('')
CALL ACTIVATE_ACCOUN T('123')
but when i do a
CALL ACTIVATE_ACCOUN T('0394df...... ') <-- forty alnum chars long, the
server hangs as in infinite loop. (the pc doesn't hang)
it seems that any forty character long input produces the error.
CREATE PROCEDURE ACTIVATE_ACCOUN T(IN p_uid CHAR(40))
BEGIN
IF(p_uid REGEXP '^[a-zA-Z0-9]{40}$') THEN
BEGIN
UPDATE
account,
member
SET
activated = 1
WHERE
account.id = member.account_ id
AND
SHA1(CONCAT(acc ount_id, email_address)) = p_uid AND activated = 0;
END;
END IF;
END