fix #844 General fix applied for adodb library. Now when $adb->getUniqueID fails…
… we retry with self::MIN_UNIQUE_ID_TRIES count
Merge request reports
Activity
84 84 var $lastmysqlrow = -1; 85 85 var $enableSQLlog = false; 86 86 var $continueInstallOnError = true; 87 87 const MIN_UNIQUE_ID_TRIES = 3; 84 84 var $lastmysqlrow = -1; 85 85 var $enableSQLlog = false; 86 86 var $continueInstallOnError = true; 87 87 const MIN_UNIQUE_ID_TRIES = 3; No i don't think is having a table lock.
And if we test with different table that has sequence for example vtiger_picklist it will result in the same.
tested on Windows: mysql Ver 14.14 Distrib 5.7.17, for Win32 (AMD64)
and linux: mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper
It seems that the adodb lib uses this for the gen sequence: update %s set id=LAST_INSERT_ID(id+1) and then it calls mysqli_insert_id to take the new id and returns it
BUT if logging is enabled it will execute in parallel based on some time another insert for the sql log table
the two inserts sometimes are in conflict and the result is 0 for recordid -> and failed Save if we are creating new record for some module in Vtiger
@krastan.petrov - glad you nailed the steps. will review.