Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
I have an application that runs queries like this:
CREATE TRIGGER t_ai |
AFTER INSERT |
ON test.t |
FOR EACH ROW |
BEGIN
|
INSERT INTO __test_changeset.t |
SET |
`id` = NEW.`id`,
|
change_timestamp = NOW(6),
|
change_type = 'INSERT' |
;
|
END; |
...and receives a "no database selected" error from MariaDB.
The error is technically correct, because the query does not specify in which database the trigger must be created. However it specifies in which database the table is, so the trigger needs to be there.
You may consider this as a funny feature request instead of a bug. However spending time to debug a query with a problem like this is not that funny... maybe this is easy to fix?
NOTE: I found this problem on 10.0, didn't check 10.1 or MySQL