MariaDB trigger using Substring gives error "Function does not exist, Check Function Name Parsing in the manual"
-1
votes
2
answers
57
views
I have this trigger as a test. It has to do a lot more. It compiles/saves fine. But when I insert a row, I get an error
>#1630 - FUNCTION databasename.SUBSTRING does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
CREATE TRIGGER Staff_BI
BEFORE INSERT ON Staff
FOR EACH ROW
BEGIN
SET NEW.Salt = SUBSTRING (MD5(RAND()), 1, 32);
SET NEW.Password = SHA2 (CONCAT(NEW.Password, NEW.Salt), 256);
END;
---
I tried with **SUBSTR** as well, with the same error
The knowledgebase did not help. I cant find anything called the **Reference Manual**

Asked by Rohit Gupta
(2122 rep)
Feb 22, 2025, 05:15 AM
Last activity: Feb 22, 2025, 11:18 PM
Last activity: Feb 22, 2025, 11:18 PM