MySQL Forums
Forum List  »  Triggers

MySQL "Before insert" trigger stops insertion process
Posted by: Hamsavardhini Deventhiran
Date: December 27, 2016 03:57AM

Intro:-
I have one sensors which is writing its processed data into an MySQL database.

Since the scanning process is every 40seconds, my data grows huge.

So I decided to prevent my sensor to write some unwanted data using triggers.

Issue:-
But the thing is, If any such row satisfies violates the condition, mysql trigger throws exception and prevent my sensor from writing data.

From the time I executed my the trigger till I deleted it, there is no data written by sensor. As soon as I dropped my trigger, data started to flow in.

My Expectation:-
I want to write a logic to an mysql table which should not allow insertion of a record, lets say if a column value is "A" and insertion process should continue.

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL "Before insert" trigger stops insertion process
1490
December 27, 2016 03:57AM


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.