Announcement

Collapse
No announcement yet.

MySQL Error : Duplicate entry '2651532' for key 'PRIMARY' Error Number : 1062

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wayne Luke
    replied
    Sounds like the autoincrement was out of sync and that was fixed by repairing the table.

    Leave a comment:


  • docvader
    replied
    MYSQL 5.7
    PHP 7.2
    I fixed the error by "repairing" the tables in PHPMYADMIN

    Some holdover from my VB 4.25? it went through a lot of upgrade steps...

    Leave a comment:


  • Wayne Luke
    replied
    Not sure why that is throwing a duplicate key error. "Replace Into" literally means, if the record exists then replace it with this data otherwise create the record. What Database Server and version are you using?

    You can clear the immediate error by running this query:

    truncate table searchlog;

    Leave a comment:


  • MySQL Error : Duplicate entry '2651532' for key 'PRIMARY' Error Number : 1062

    Upgraded VB to 5.5.5 from 4.25 a week ago, everything went very well, had no problems at all. Followed directions implicitly. I have been using VB for ten, fifteen years now, never had a problem.

    A week after upgrading, now I get this database error, getting an email every minute or so, the result of all sorts of actions in the forum (searching, reading, etc, following is an example):


    REPLACE INTO searchlog
    (type,userid,ipaddress,searchhash,sortby,sortorder,searchtime,dateline,completed,json,resu lts,results_count)
    VALUES
    ('0','0','46.229.168.143','67a6575f3e407652e989991d434f3a81','created','desc','0.001425981 5216064','1574921112','0','{"include_visitor_messages":1,"authorid":3854,"date":{"from":"l astMonth"},"view":"conversation_stream","exclude_type":"vBForum_PrivateMessage"}','','0');

    MySQL Error : Duplicate entry '2651532' for key 'PRIMARY'
    Error Number : 1062
    Request Date : Thursday, November 28th 2019 @ 06:05:12 AM
    Error Date : Thursday, November 28th 2019 @ 06:05:12 AM
    Script : http://forum.russbo.com/member/3854-...am&type=photos
    Referrer :
    IP Address : 46.229.168.143
    Username : Guest
    Classname : vB_Database_MySQLi
    MySQL Version :


    Stack Trace:
    #0 vB_Database->getErrorData() called in [path]/vb/database.php on line 1207
    #1 vB_Database->halt() called in [path]/vb/database/mysqli.php on line 249
    #2 vB_Database_MySQLi->execute_query() called in [path]/vb/database.php on line 561
    #3 vB_Database->query_write() called in [path]/packages/vbdbsearch/db/mysql/querydefs.php on line 694
    #4 vBDBSearch_dB_MYSQL_QueryDefs->cacheResults() called in [path]/vb/db/query/method.php on line 175
    #5 vB_dB_Query_Method->execSQL() called in [path]/vb/db/assertor.php on line 301
    #6 vB_dB_Assertor->assertQuery() called in [path]/vb/search/core.php on line 418
    #7 vB_Search_Core->cacheResults() called in [path]/vb/api/search.php on line 167
    #8 vB_Api_Search->getSearchResultsCriteria() called in [path]/vb/api/search.php on line 130
    #9 vB_Api_Search->getSearchResult() called in [path]/vb/api/search.php on line 226
    #10 vB_Api_Search->getInitialResults() called in [path]/vb/api/wrapper.php on line 201
    #11 vB_Api_Wrapper->__call() called in /home/xxxxx/public_html/forum/includes/api/interface/collapsed.php on line 101
    #12 Api_Interface_Collapsed->callApi() called in /home/xxxxx/public_html/forum/includes/vb5/template/runtime.php on line 1028
    #13 vB5_Template_Runtime:arseData() called in /home/xxxxx/public_html/forum/includes/vb5/template.php(400) : eval()'d code on line 598
    #14 eval() called in /home/xxxxxx/public_html/forum/includes/vb5/template.php on line 400
    #15 vB5_Template->render() called in /home/xxxxx/public_html/forum/includes/vb5/template/cache.php on line 134
    #16 vB5_Template_Cache->replacePlaceholders() called in /home/xxxxx/public_html/forum/includes/vb5/template.php on line 422
    #17 vB5_Template->render() called in /home/xxxxxx/public_html/forum/includes/vb5/template/cache.php on line 134
    #18 vB5_Template_Cache->replacePlaceholders() called in /home/xxxxxx/public_html/forum/includes/vb5/template.php on line 422
    #19 vB5_Template->render() called in /home/xxxxx/public_html/forum/includes/vb5/template/cache.php on line 134
    #20 vB5_Template_Cache->replacePlaceholders() called in /home/xxxx/public_html/forum/includes/vb5/template.php on line 422
    #21 vB5_Template->render() called in /home/xxxxx/public_html/forum/includes/vb5/template/cache.php on line 134
    #22 vB5_Template_Cache->replacePlaceholders() called in /home/xxxx/public_html/forum/includes/vb5/template.php on line 422
    #23 vB5_Template->render() called in /home/xxxxx/public_html/forum/includes/vb5/frontend/controller/page.php on line 259
    #24 vB5_Frontend_Controller_Page->index() called in /home/xxxxx/public_html/forum/index.php on line 74


    any suggestions greatly appreciated!


    EDIT: Fixed it by repairing the database, any idea what could have caused this?
    rich
    Last edited by docvader; Wed 27th Nov '19, 10:24pm.

Related Topics

Collapse

Working...
X