-
Sujatha Sivakumar authored
MYSQL 5.6 UPGRADE. Problem: ======== After upgrading a MySQL 5.5.23 slave to 5.6.14 (the master still runs 5.5.23) on executing INSERT ON DUPLICATE KEY following error is reported in SBR. [ERROR] Slave SQL: Error 'Auto-increment value in UPDATE conflicts with internally generated values' on query. Analysis: ======== On master when user specifies an autoincrement value in multi insert statement the user given value is compared with current auto increment value and current + number of rows affected value. Whenever the user specified value falls within the given range ER_AUTO_INCREMENT_CONFLICT error is generated. On the slave the range is set to the value ULONGULONG_MAX by default. Whenever user specifies any value it will always fall within the above range and error gets generated. On slave each DML operation will result in n number of rows being manipulated. When number of manipulated rows is known the value range can be reset to currect value to current+n. Fix: === On slave identify the number of rows being manipulated. Reset the value ranage from currnet value to current value + number of maninupated rows. If the number is not known go ahead with default values.
Sujatha Sivakumar authoredMYSQL 5.6 UPGRADE. Problem: ======== After upgrading a MySQL 5.5.23 slave to 5.6.14 (the master still runs 5.5.23) on executing INSERT ON DUPLICATE KEY following error is reported in SBR. [ERROR] Slave SQL: Error 'Auto-increment value in UPDATE conflicts with internally generated values' on query. Analysis: ======== On master when user specifies an autoincrement value in multi insert statement the user given value is compared with current auto increment value and current + number of rows affected value. Whenever the user specified value falls within the given range ER_AUTO_INCREMENT_CONFLICT error is generated. On the slave the range is set to the value ULONGULONG_MAX by default. Whenever user specifies any value it will always fall within the above range and error gets generated. On slave each DML operation will result in n number of rows being manipulated. When number of manipulated rows is known the value range can be reset to currect value to current+n. Fix: === On slave identify the number of rows being manipulated. Reset the value ranage from currnet value to current value + number of maninupated rows. If the number is not known go ahead with default values.
Loading