Bug #60673 Wrong trigger in Sakila demo database
Submitted: 28 Mar 2011 12:18 Modified: 15 Dec 2011 19:29
Reporter: Jakub Vrána (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: qc

[28 Mar 2011 12:18] Jakub Vrána
Description:
Sakila demo database available at http://dev.mysql.com/doc/index-other.html contains some triggers. The `upd_film` trigger is not foolproof.

How to repeat:
UPDATE film SET film_id = 1001 WHERE film_id = 1000;

This change would not issue the `upd_film` trigger resulting in inconsistency of `film_text`.

Suggested fix:
Change:

IF (old.title != new.title) or (old.description != new.description)

to:

IF (old.title != new.title) or (old.description != new.description) or (old.film_id != new.film_id)
[7 Jul 2011 12:34] MySQL Verification Team
Thank you for the bug report.
[15 Dec 2011 19:29] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.