
Dear All, All of sudden I see the following errors in OTRS log: Duplicate entry '0' for key 'PRIMARY', SQL: 'INSERT INTO ticket (tn, title, create_time_unix, type_id, queue_id, ticket_lock_id, user_id, responsible_user_id, group_id, ticket_priority_id, ticket_state_id, ticket_answered, escalation_time, escalation_update_time, escalation_response_time, escalation_solution_time, timeout, service_id, sla_id, until_time, valid_id, create_time, create_by, change_time, change_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0, 0, 0, 0, ?, ?, 0, ?, current_timestamp, ?, current_timestamp, ?)' Please Help! It is urgent. Thanks and Regards, Amit Sharma

Looks like your auto_increment has been reset to 0.
You can see what the current auto_increment value is by running: SELECT
Auto_increment FROM information_schema.tables WHERE table_name='ticket' AND
table_schema = DATABASE(); - if it has been reset then it should be 0.
If it is indeed 0 then you will need to workout what the last value entered
into the table was: SELECT max(id) FROM ticket;
The you can update* the auto_increment to be 1 ahead of that value: ALTER
TABLE ticket AUTO_INCREMENT = XXX;
Steve
* Do this at your own risk, and don't do this if you have any form of
replication/multi-master/master-slave in place.
On 22 February 2012 06:47, Amit Sharma
Dear All,
All of sudden I see the following errors in OTRS log:
Duplicate entry '0' for key 'PRIMARY', SQL: 'INSERT INTO ticket (tn, title, create_time_unix, type_id, queue_id, ticket_lock_id, user_id, responsible_user_id, group_id, ticket_priority_id, ticket_state_id, ticket_answered, escalation_time, escalation_update_time, escalation_response_time, escalation_solution_time, timeout, service_id, sla_id, until_time, valid_id, create_time, create_by, change_time, change_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0, 0, 0, 0, ?, ?, 0, ?, current_timestamp, ?, current_timestamp, ?)'
Please Help! It is urgent.
Thanks and Regards, *Amit Sharma*
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (2)
-
Amit Sharma
-
Steven Carr