Bug #67451 | In mysql cluster 7.2 trigger bug occured. this is seriou reliability problem. | ||
---|---|---|---|
Submitted: | 2 Nov 2012 2:01 | Modified: | 11 Dec 2014 6:17 |
Reporter: | ws lee | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | mysql5.5.27-ndb7.2.8 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression |
[2 Nov 2012 2:01]
ws lee
[6 Nov 2012 11:33]
MySQL Verification Team
Thank you for the report. Verified as described.
[10 Apr 2013 21:21]
Eddy Pulido
To avoid having to calculate the number of unique logins that have transpired in a day, we have a summary table which has the trigger below. Every time a unique login occurs, a new value is calculated into the corresponding row of the summary table. We've made sure each SQL Node has this trigger since MySQL Cluster does not replicate those files to all SQL Nodes. However, after I've tried shutting down SQL Nodes randomly and bringing them back online, the summary table no longer gets updated when a unique login occurs. Here's the trigger code. CREATE TRIGGER summary_trigger AFTER INSERT ON login FOR EACH ROW BEGIN IF (SELECT COUNT(1) FROM (SELECT 1 FROM login WHERE MONTH(login_day) = MONTH(NOW()) AND login.bussiness_id = new.bussiness_id AND login.app_id = new.app_id AND login.company_id = new.company_id LIMIT 2) t) = 1 THEN /* this User(new.bussiness_id) not in login table this month, update count */ UPDATE login_summary SET unique_sessions = unique_sessions + 1 WHERE login_summary.login_month = MONTH(NOW()) AND login_summary.app_id = new.app_id AND login_summary.company_id = new.company_id; IF ROW_COUNT() = 0 THEN /* update resulted in 0 rows being modified so do insert */ INSERT INTO login_summary VALUES (MONTH(NOW()), new.company_id, new.app_id, 1); END IF; END IF; END I'm using the following version of MySQL, and I'm running on SLES 11.x: mysql Ver 14.14 Distrib 5.5.29-ndb-7.2.10, for Linux (x86_64) using readline 5.1 This behavior is consistent and we can reproduce regularly. The problem also surfaces when the SQL Nodes run out of connections, say, if we don't loadbalance the JDBC URL. my 2 cents, fwiw.
[11 Dec 2014 6:16]
MySQL Verification Team
Marking this as duplicate of Bug #74751.