summaryrefslogtreecommitdiff
path: root/innobase/include/lock0lock.h
diff options
context:
space:
mode:
authorunknown <jan@hundin.mysql.fi>2004-12-09 11:10:45 +0200
committerunknown <jan@hundin.mysql.fi>2004-12-09 11:10:45 +0200
commit0f99fe728e9d32d8b6bf098775d1ef86235f8a47 (patch)
tree113b7055d0917544b26a20941cdfeccff09142ba /innobase/include/lock0lock.h
parentf88e0d9c073e03e35766d56f39d227aff4e3fbbc (diff)
downloadmariadb-git-0f99fe728e9d32d8b6bf098775d1ef86235f8a47.tar.gz
Added support for a LOCK TABLES...WHERE ENGINE = InnoDB query which sets
transactional table locks to tables mentioned in the query. These locks are released at the end of the transaction automatically. This is fix for bugs #5655, #5998 and issue #3762. innobase/include/lock0lock.h: Added a new lock type LOCK_TABLE_TRANSACTIONAL. innobase/include/trx0trx.h: Added a varible to store the number of transactional table locks reserved by the transaction and stored in the trx_locks list. innobase/lock/lock0lock.c: Added a lock type LOCK_TABLE_TRANSACTIONAL. innobase/row/row0mysql.c: Added support for a transactional table lock. innobase/trx/trx0roll.c: Make compiler happy and format function. innobase/trx/trx0trx.c: Added information about number of explicit and transactional table locks in the innodb monitor. sql/ha_innodb.cc: Added support for a LOCK_TABLE_TRANSACTIONAL table lock (SQLCOM_LOCK_TABLES_TRANSACTIONAL). Transactional table locks are taken in the function ::transactional_table_lock(). sql/ha_innodb.h: Added prototype for a function trandactional_table_lock(). sql/handler.h: Added prototype for a virtual function transactional_table_lock(). Handler does not need to implement this function. sql/lock.cc: Added a function transactional_lock_tables() to lock all tables in the list with transactional table lock. These locks can cause a deadlock and this error should be reported back to user. sql/mysql_priv.h: Added prototype for a function transactional_lock_tables(). sql/sql_lex.h: Added SQLCOM_LOCK_TABLES_TRANSACTIONAL command. sql/sql_parse.cc: Added SQLCOM_LOCK_TABLES_TRANSACTIONAL command. sql/sql_yacc.yy: Added parsing rules for a LOCK TABLES...WHERE ENGINE = x;
Diffstat (limited to 'innobase/include/lock0lock.h')
-rw-r--r--innobase/include/lock0lock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/innobase/include/lock0lock.h b/innobase/include/lock0lock.h
index d642fe46fef..2199ba36881 100644
--- a/innobase/include/lock0lock.h
+++ b/innobase/include/lock0lock.h
@@ -585,6 +585,8 @@ extern lock_sys_t* lock_sys;
#define LOCK_TABLE 16 /* these type values should be so high that */
#define LOCK_REC 32 /* they can be ORed to the lock mode */
#define LOCK_TABLE_EXP 80 /* explicit table lock (80 = 16 + 64) */
+#define LOCK_TABLE_TRANSACTIONAL 144
+ /* transactional table lock (144 = 16 + 128)*/
#define LOCK_TYPE_MASK 0xF0UL /* mask used to extract lock type from the
type_mode field in a lock */
/* Waiting lock flag */