1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

InnoDB: Make intermediate COMMITs in ALTER TABLE more robust (Bug #6633)

innobase/include/lock0lock.h:
  Replaced lock_get_ix_table() with lock_get_table().
innobase/lock/lock0lock.c:
  Replaced lock_get_ix_table() with lock_get_table().
innobase/include/row0mysql.h:
  row_lock_table_for_mysql(): Added parameter mode.
innobase/row/row0mysql.c:
  row_lock_table_for_mysql(): Added parameter mode.
sql/ha_innodb.cc:
  ha_innobase::write_row(): Make ALTER TABLE commits more robust:
  account for conversions from non-InnoDB format,
  do not attempt to commit if there are other than
  a single IX or IS lock on the source table, and
  the source table is in InnoDB format.  This
  prohibits intermediate commits for OPTIMIZE TABLE
  if the table contains an auto_increment field.
This commit is contained in:
unknown
2004-11-27 00:45:01 +02:00
parent b0d586e564
commit 346dce93c2
5 changed files with 102 additions and 33 deletions

View File

@ -177,10 +177,12 @@ row_lock_table_for_mysql(
/* out: error code or DB_SUCCESS */
row_prebuilt_t* prebuilt, /* in: prebuilt struct in the MySQL
table handle */
dict_table_t* table); /* in: table to LOCK_IX, or NULL
dict_table_t* table, /* in: table to lock, or NULL
if prebuilt->table should be
locked as LOCK_TABLE_EXP |
prebuilt->select_lock_type */
ulint mode); /* in: lock mode of table */
/*************************************************************************
Does an insert for MySQL. */