1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

InnoDB: commit after every 10000 rows in ALTER TABLE

innobase/include/lock0lock.h:
  Added function lock_get_ix_table()
innobase/include/row0mysql.h:
  Added parameter "table" to row_lock_table_for_mysql()
innobase/lock/lock0lock.c:
  Added function lock_get_ix_table()
innobase/row/row0mysql.c:
  Added parameter "table" to row_lock_table_for_mysql()
sql/ha_innodb.cc:
  write_row(): commit every 10000 rows in ALTER TABLE
sql/ha_innodb.h:
  Added member variable num_write_row
This commit is contained in:
unknown
2004-11-03 21:32:48 +02:00
parent 37e92c9b3c
commit d07f96cf49
6 changed files with 65 additions and 6 deletions

View File

@ -779,8 +779,12 @@ int
row_lock_table_for_mysql(
/*=====================*/
/* out: error code or DB_SUCCESS */
row_prebuilt_t* prebuilt) /* in: prebuilt struct in the MySQL
row_prebuilt_t* prebuilt, /* in: prebuilt struct in the MySQL
table handle */
dict_table_t* table) /* in: table to LOCK_IX, or NULL
if prebuilt->table should be
locked as LOCK_TABLE_EXP |
prebuilt->select_lock_type */
{
trx_t* trx = prebuilt->trx;
que_thr_t* thr;
@ -813,8 +817,12 @@ run_again:
trx_start_if_not_started(trx);
err = lock_table(LOCK_TABLE_EXP, prebuilt->table,
prebuilt->select_lock_type, thr);
if (table) {
err = lock_table(0, table, LOCK_IX, thr);
} else {
err = lock_table(LOCK_TABLE_EXP, prebuilt->table,
prebuilt->select_lock_type, thr);
}
trx->error_state = err;