1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

- set 'updating' in both tables list if we have two of them (because of subquery) (BUG#13236)

- fixed test


mysql-test/r/rpl_multi_update2.result:
  fixed setting/reseting environment
  multi-update with subquery added
mysql-test/t/rpl_multi_update2.test:
  fixed setting/reseting environment
  multi-update with subquery added
sql/sql_update.cc:
  set 'updating' in both tables list if we have two of them (because of subquery)
This commit is contained in:
unknown
2005-10-14 00:02:38 +03:00
parent c8067ec848
commit 0069549021
3 changed files with 46 additions and 2 deletions

View File

@@ -569,7 +569,9 @@ int mysql_multi_update_lock(THD *thd,
}
DBUG_PRINT("info",("setting table `%s` for update", tl->alias));
tl->lock_type= thd->lex->multi_lock_option;
tl->updating= 1;
tl->updating= 1; // loacal or only list
if (tl->table_list)
tl->table_list->updating= 1; // global list (if we have 2 lists)
wants= UPDATE_ACL;
}
else
@@ -579,7 +581,9 @@ int mysql_multi_update_lock(THD *thd,
// correct order of statements. Otherwise, we use a TL_READ lock to
// improve performance.
tl->lock_type= using_update_log ? TL_READ_NO_INSERT : TL_READ;
tl->updating= 0;
tl->updating= 0; // loacal or only list
if (tl->table_list)
tl->table_list->updating= 0; // global list (if we have 2 lists)
wants= SELECT_ACL;
}