Bug #74012 Mysql Trigger bug
Submitted: 22 Sep 2014 13:15 Modified: 23 Sep 2014 8:14
Reporter: Balázs Zámbó Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.5.38 OS:Linux (Ubuntu 14.04)
Assigned to: CPU Architecture:Any
Tags: privilages, trigger

[22 Sep 2014 13:15] Balázs Zámbó
Trigger runs in wrong database.

How to repeat:
When you have a database named: "first"
this have tables, and triggers.

You create a copy, and named: "first-new"

now, got 2 database:
- first
- first-new

create a same trigger in fists-new.

when a trigger called in "first-new", that runs and work on "first" database.
[22 Sep 2014 13:22] Peter Laursen
To me this looks like a client issue (or a user error) and not a server issue.

What client do you use? 

-- Peter
-- not a MySQL/Oracle person.
[22 Sep 2014 14:46] Balázs Zámbó
Dear Peter!

may helps you:

Database server

    Server: Localhost via UNIX socket
    Server type: Percona Server
    Server version: 5.6.20-68.0 - Percona Server (GPL), Release 68.0, Revision 656
    Protocol version: 10
    Server charset: UTF-8 Unicode (utf8)

Web server

    Apache/2.4.10 (Ubuntu)
    Database client version: libmysql - 5.5.38
    PHP extension: mysqli

PHP Version 5.5.16-1+deb.sury.org~trusty+2

i used mysql across PDO driver.

If you need, i create a dump for you.

[22 Sep 2014 16:02] MySQL Verification Team
Please provide a test case with dump file. Thanks.
[23 Sep 2014 8:14] Balázs Zámbó
my bad... sorry.

And thanks your kindness.