Code: Select all
Cannot add or update a child row: a foreign key constraint fails (`otrs/queue_standard_response`, CONSTRAINT `FK_queue_standard_response_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)),
SQL: 'INSERT INTO queue_standard_response (queue_id, standard_response_id, create_time, create_by, change_time, change_by) VALUES (?, ?, current_timestamp, ?, current_timestamp, ?)',
I've checked the queue_standard_response table, and it contains IDs from queue and standard_response. All of the IDs in this table are present in their respective tables.
I don't really want to turn MySQL's SQL logging on unless it's absolutely necessary, as this is a system that's just about to go live. Is there anything else I can check?
EDIT: Here are the tables in question...
Code: Select all
mysql> select * from queue_standard_response;
+----------+----------------------+---------------------+-----------+---------------------+-----------+
| queue_id | standard_response_id | create_time | create_by | change_time | change_by |
+----------+----------------------+---------------------+-----------+---------------------+-----------+
| 6 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 9 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 7 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 3 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 4 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 1 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 2 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 8 | 1 | 2011-01-19 18:20:51 | 2 | 2011-01-19 18:20:51 | 2 |
| 5 | 12 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 3 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 1 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 4 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 5 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 8 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 6 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 7 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 9 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 11 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 10 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 16 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 15 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 17 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 14 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
| 5 | 13 | 2011-01-19 18:21:00 | 2 | 2011-01-19 18:21:00 | 2 |
+----------+----------------------+---------------------+-----------+---------------------+-----------+
24 rows in set (0.00 sec)
Code: Select all
mysql> select id from queue;
+----+
| id |
+----+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
+----+
9 rows in set (0.00 sec)
Code: Select all
mysql> select id from standard_response;
+----+
| id |
+----+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 |
| 16 |
| 17 |
+----+
17 rows in set (0.00 sec)