MySQL Forums
Forum List  »  Triggers

Unable to view/modify TRIGGER
Posted by: Steven Fullmer
Date: June 28, 2011 11:27PM

I have these triggers:
mysql> SHOW TRIGGERS;
+-----------------+--------+-----------+--------------------------------------------------+--------+---------+----------+-----------------+----------------------+----------------------+--------------------+
| Trigger         | Event  | Table     | Statement                                        | Timing | Created | sql_mode | Definer         | character_set_client | collation_connection | Database Collation |
+-----------------+--------+-----------+--------------------------------------------------+--------+---------+----------+-----------------+----------------------+----------------------+--------------------+
| trg_author_dt   | INSERT | Authors   | SET    NEW.Modified=NOW(),    NEW.Creation=NOW() | BEFORE | NULL    |          | mysql@localhost | utf8                 | utf8_general_ci      | latin1_swedish_ci  |
| trg_author_md   | UPDATE | Authors   | SET    NEW.modified=NOW()                        | BEFORE | NULL    |          | mysql@localhost | utf8                 | utf8_general_ci      | latin1_swedish_ci  |
+-----------------+--------+-----------+--------------------------------------------------+--------+---------+----------+-----------------+----------------------+----------------------+--------------------+

I have these tables:

mysql> USE bibliophile;
Database changed
mysql> SHOW TABLES;
+-----------------------+
| Tables_in_bibliophile |
+-----------------------+
| Authors               |
| Books                 |
| Materials             |
| Subjects              |
| Tags                  |
| linkAuthorBook        |
| linkBookTag           |
+-----------------------+
7 rows in set (0.00 sec)
I have the following defined for the 'Authors' table:
mysql> SHOW CREATE TABLE Authors;
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table   | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Authors | CREATE TABLE `Authors` (
  `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Author ID',
  `Name` varchar(50) NOT NULL COMMENT 'Name of the author',
  `Creation` datetime DEFAULT NULL COMMENT 'Never modified after initial record creation',
  `Modified` datetime DEFAULT NULL COMMENT 'Updated whenever this author info updated',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Name` (`Name`)
) ENGINE=InnoDB AUTO_INCREMENT=1024 DEFAULT CHARSET=utf8 |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

I try to update, drop, or simply SHOW CREATE TRIGGER and I get the following:
mysql> DROP TRIGGER trg_author_dt;
ERROR 1146 (42S02): Table 'bibliophile.Authors' doesn't exist

The "ERROR 1146 (42S02)" doesn't yield any help on Google, even when combined with various keywords and TRIGGER.

MySQL has not been upgraded; everything is running on the same 5.5.11 version that I started. I have tried as the 'mysql' user (non-SUPER account) and root (SUPER account) and get the same results.

What I have done is extensive changes to the tables. It had originally been named _author, then _authors, then Author, then Authors. Its data has been DELETEd multiple times, columns added and removed (but never the 'Creation' or 'Modified' columns).

I'm puzzled. I wanted to see the syntax I used to create the triggers in the first place, but I can't even do that like I can with something like 'SHOW CREATE TABLE Authors;'.

Options: ReplyQuote


Subject
Views
Written By
Posted
Unable to view/modify TRIGGER
3099
June 28, 2011 11:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.