diff options
author | unknown <heikki@donna.mysql.fi> | 2001-03-01 19:43:29 +0200 |
---|---|---|
committer | unknown <heikki@donna.mysql.fi> | 2001-03-01 19:43:29 +0200 |
commit | 59eafdac11b39732b23720ff277a75ce234abc86 (patch) | |
tree | 1125ddc97feb752c4397d08f7fa07bb1f624b432 /sql | |
parent | b4b56b3c00137c75b31526985c90ecb3f10824e4 (diff) | |
download | mariadb-git-59eafdac11b39732b23720ff277a75ce234abc86.tar.gz |
ha_innobase.cc Fixed a bug in ha_innobase.cc in auto_increment
sql/ha_innobase.cc:
Fixed a bug in ha_innobase.cc in auto_increment
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innobase.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 7e83718294a..197a46c06cd 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -1222,7 +1222,21 @@ ha_innobase::write_row( } if (table->next_number_field && record == table->record[0]) { + /* Set the 'in_update_remember_pos' flag to FALSE to + make sure all columns are fetched in the select done by + update_auto_increment */ + + prebuilt->in_update_remember_pos = FALSE; + update_auto_increment(); + + /* We have to set sql_stat_start to TRUE because + update_auto_increment has called a select, and + has reset that flag; row_insert_for_mysql has to + know to set the IX intention lock on the table, something + it only does at the start of each statement */ + + prebuilt->sql_stat_start = TRUE; } if (prebuilt->mysql_template == NULL |