diff options
author | unknown <marko@hundin.mysql.fi> | 2004-11-03 21:32:48 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-11-03 21:32:48 +0200 |
commit | e45a57d3e46c3a11704800a10467a5cc66682a99 (patch) | |
tree | 0d981727fb0b5fe6050d51af4a11d69d6ea3c9d0 /innobase/row | |
parent | ce8ca34e0a97d42f1c2749846ba0a818d40dc03f (diff) | |
download | mariadb-git-e45a57d3e46c3a11704800a10467a5cc66682a99.tar.gz |
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
Diffstat (limited to 'innobase/row')
-rw-r--r-- | innobase/row/row0mysql.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 241ddc310e8..3e780138261 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -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; |