SQL Problem

Hi,

SQL problem after repair a disk full and restart SQL

[2015-12-29 11:43:00] NOTICE[18487] res_odbc.c: Connecting asteriskcdrdb
[2015-12-29 11:43:00] NOTICE[18487] res_odbc.c: res_odbc: Connected to asteriskcdrdb [MySQL-asteriskcdrdb]
[2015-12-29 11:43:00] WARNING[18487] cel_odbc.c: Insert failed on ‘asteriskcdrdb:cel’. CEL failed: INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES (‘CHAN_END’,{ts ‘2015-12-29 11:43:00’},‘Unite 4’,‘354’,‘354’,’’,‘352’,‘352’,‘from-internal’,‘SIP/354-000000b2’,’’,’’,3,’’,‘1451407339.183’,‘1451407339.183’,’’,’’,’’)
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: SQL Execute returned an error -1: 23000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Duplicate entry ‘4790305’ for key ‘PRIMARY’ (82)
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: SQL Execute error -1! Verifying connection to asteriskcdrdb [MySQL-asteriskcdrdb]…
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: Connection is down attempting to reconnect…
[2015-12-29 11:43:00] NOTICE[18487] res_odbc.c: Connecting asteriskcdrdb
[2015-12-29 11:43:00] NOTICE[18487] res_odbc.c: res_odbc: Connected to asteriskcdrdb [MySQL-asteriskcdrdb]
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: SQL Execute returned an error -1: 23000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Duplicate entry ‘4790305’ for key ‘PRIMARY’ (82)
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: SQL Execute error -1! Verifying connection to asteriskcdrdb [MySQL-asteriskcdrdb]…
[2015-12-29 11:43:00] WARNING[18487] res_odbc.c: Connection is down attempting to reconnect…

What can i do to repair ???

Thaks for your help

Hi,

Try to rebuild the cel table indexes from the mysql client like this (mysql):

use asteriskcdrdb
repair table cel

Thank you,

Daniel Friedman
Trixton LTD