CREATE TRIGGER bugged?
See original GitHub issueI tried to run this query with MariaDB engine:
DELIMITER $$
CREATE TRIGGER bla BEFORE INSERT ON buerger_status
FOR EACH ROW
BEGIN
IF (new.id = 1) THEN
SIGNAL SQLSTATE 'bla' SET MESSAGE_TEXT = 'message', MYSQL_ERRNO = 1000;
END IF;
END;$$
DELIMITER ;
This doesn’t work and reports:
SQL Error [1064] [42000]: 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 1
Generally I have some troubles with TRIGGERS and DBeaver (sometimes unreproducable 😦!).
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to fix this bug when creating this trigger in MySQL? [closed]
I created two triggers that are almost the same. The triggers look like this: Trigger 1 delimiter !! drop trigger if exists updated_movie ......
Read more >39489: Cannot create or drop triggers without SUPER privilege
Bug #39489, Cannot create or drop triggers without SUPER privilege ... 1) "CREATE TRIGGER requires the TRIGGER privilege for the table ...
Read more >If Your Trigger Uses UPDATE(), It's Probably Broken.
CREATE OR ALTER TRIGGER dbo.ResetReputation ON dbo.Users AFTER INSERT, UPDATE AS BEGIN /* If they moved locations, reset their reputation.
Read more >Database triggers not working - DEV Community
CREATE OR REPLACE FUNCTION update_vote_count() RETURNS trigger LANGUAGE ... The problem is that, this function is not triggering and I don't ...
Read more >Trigger not working, why? [closed]
First let's create the tables and the triggers: MySQL 5.5.32 Schema Setup: CREATE TABLE bookings(id INT, articlenr INT, amount ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, you need ALT+X if you going to execute multiple queries. Let’s track scripts processing bugs in other issues.
It does work in console and also in DBeaver with
ALT + X
. It doesn’t work withCTRL + ENTER
, it causes weird behaviour.