diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-09-26 14:50:25 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-09-26 14:50:25 +0300 |
commit | b0bf32fd57def0a364cd2803d48caf8c0975dd05 (patch) | |
tree | da7713a2cdbe703499b7d84d37ca2f56828f918c /sql/ha_innodb.cc | |
parent | 54ad43bd6ef2af8d9939f6908d32b9701de046ef (diff) | |
download | mariadb-git-b0bf32fd57def0a364cd2803d48caf8c0975dd05.tar.gz |
ha_innodb.cc:
Fix an assertion in btr0pcur.c line 203 when an UPDATE is done inside LOCK TABLES
sql/ha_innodb.cc:
Fix an assertion in btr0pcur.c line 203 when an UPDATE is done inside LOCK TABLES
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 670ea914b21..2c27f565895 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3672,7 +3672,15 @@ ha_innobase::start_stmt( prebuilt->sql_stat_start = TRUE; prebuilt->hint_no_need_to_fetch_extra_cols = TRUE; prebuilt->read_just_key = 0; - prebuilt->select_lock_type = LOCK_NONE; + + if (prebuilt->select_lock_type == LOCK_NONE) { + /* This handle is for a temporary table created inside + this same LOCK TABLES; since MySQL does NOT call external_lock + in this case, we must use x-row locks inside InnoDB to be + prepared for an update of a row */ + + prebuilt->select_lock_type = LOCK_X; + } thd->transaction.all.innodb_active_trans = 1; |