diff options
author | unknown <marko@hundin.mysql.fi> | 2004-11-30 17:50:56 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-11-30 17:50:56 +0200 |
commit | 892cec855512e271fbffc66439fc3b3b06140e2a (patch) | |
tree | 11ac976879496b8b599ebaa8f1a4927c5fe26b29 /innobase/include/lock0lock.h | |
parent | 668d61b946d6487829c28a2860ecff7df7637d09 (diff) | |
parent | 795045d9a01ac816360c1477625713beaad429cc (diff) | |
download | mariadb-git-892cec855512e271fbffc66439fc3b3b06140e2a.tar.gz |
Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/k/mysql-4.1
Diffstat (limited to 'innobase/include/lock0lock.h')
-rw-r--r-- | innobase/include/lock0lock.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/innobase/include/lock0lock.h b/innobase/include/lock0lock.h index f8435e14d97..ff5b6aae02e 100644 --- a/innobase/include/lock0lock.h +++ b/innobase/include/lock0lock.h @@ -463,13 +463,32 @@ lock_rec_hash( ulint space, /* in: space */ ulint page_no);/* in: page number */ /************************************************************************* -Gets the table covered by an IX table lock. */ +Gets the source table of an ALTER TABLE transaction. The table must be +covered by an IX or IS table lock. */ dict_table_t* -lock_get_ix_table( -/*==============*/ - /* out: the table covered by the lock */ - lock_t* lock); /* in: table lock */ +lock_get_src_table( +/*===============*/ + /* out: the source table of transaction, + if it is covered by an IX or IS table lock; + dest if there is no source table, and + NULL if the transaction is locking more than + two tables or an inconsistency is found */ + trx_t* trx, /* in: transaction */ + dict_table_t* dest, /* in: destination of ALTER TABLE */ + ulint* mode); /* out: lock mode of the source table */ +/************************************************************************* +Determine if the given table is exclusively "owned" by the given +transaction, i.e., transaction holds LOCK_IX and possibly LOCK_AUTO_INC +on the table. */ + +ibool +lock_table_exclusive( +/*=================*/ + /* out: TRUE if table is only locked by trx, + with LOCK_IX, and possibly LOCK_AUTO_INC */ + dict_table_t* table, /* in: table */ + trx_t* trx); /* in: transaction */ /************************************************************************* Checks that a transaction id is sensible, i.e., not in the future. */ |