Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.4.26
-
None
Description
The error 1062 (Duplicate entry) was reported when trying to insert tuple immediately after deleting all table tuples (The delete operation has been commited via mysql_query C API before insert):
at 89661187
#230322 7:46:48 server id 1 end_log_pos 89661299 CRC32 0x6f24d9f8 Query thread_id=451878 exec_time=0 error_code=0
SET TIMESTAMP=1679471208/!/;
delete from appcnfg.sipia_port_status
+++ 2023/03/22 07:46:48.549 FAULT HIGH dbload:4023999 E:7128 S:1 (MariadbTran.cpp 1536 v-0001 169.254.64.1 oam-a)
Error: Statement 'insert into appcnfg.sipia_port_status (node_id, port_name, filler1, port_type, administrative_state, service_state) values (320, 'ecsf-stdn', 0, 10, 1, 1);' failed, rc = 1.
Error Number:1062; Error String:Duplicate entry '320-ecsf-stdn' for key 'PRIMARY'.
Is it possible that the delete operation has not been fully committed (even mysql_query ("commit") returned success) while the insert comes? How to ensure a clean start for insert?