Commit 033fffe6 authored by sunny's avatar sunny

branches/5.1: Fix for Bug#35602, "Failed to read auto-increment value from

storage engine". The test for REPLACE was an error of ommission since it's
classified as a simple INSERT. For REPLACE statements we don't acquire
the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
parent 068bf84c
...@@ -3277,7 +3277,8 @@ ha_innobase::innobase_autoinc_lock(void) ...@@ -3277,7 +3277,8 @@ ha_innobase::innobase_autoinc_lock(void)
old style only if another transaction has already acquired old style only if another transaction has already acquired
the AUTOINC lock on behalf of a LOAD FILE or INSERT ... SELECT the AUTOINC lock on behalf of a LOAD FILE or INSERT ... SELECT
etc. type of statement. */ etc. type of statement. */
if (thd_sql_command(user_thd) == SQLCOM_INSERT) { if (thd_sql_command(user_thd) == SQLCOM_INSERT
|| thd_sql_command(user_thd) == SQLCOM_REPLACE) {
dict_table_t* table = prebuilt->table; dict_table_t* table = prebuilt->table;
/* Acquire the AUTOINC mutex. */ /* Acquire the AUTOINC mutex. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment