diff options
author | unknown <serg@serg.mylan> | 2004-12-27 12:08:22 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-12-27 12:08:22 +0100 |
commit | 520e7f2d50d107cae54f749a1655886e015483c7 (patch) | |
tree | 08b45f0a64f271720c69e9127f424797b13ff525 /sql/lock.cc | |
parent | 6499169d811a041cdccd561cced7f1478a8e0719 (diff) | |
download | mariadb-git-520e7f2d50d107cae54f749a1655886e015483c7.tar.gz |
revert "LOCK TABLES ... WHERE ENGINE=INNODB"
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 393cf4cf142..973e82b7b10 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -939,61 +939,3 @@ bool make_global_read_lock_block_commit(THD *thd) DBUG_RETURN(error); } -/* - Take transactional table lock for all tables in the list - - SYNOPSIS - transactional_lock_tables - thd Thread THD - tables list of tables - counter number of tables in the list - - NOTES - - RETURN - 0 - OK - -1 - error - -*/ -int transactional_lock_tables(THD *thd, TABLE_LIST *tables, uint counter) -{ - uint i; - int lock_type,error=0; - TABLE_LIST *table; - TABLE **start,**ptr; - - DBUG_ENTER("transactional_lock_tables"); - - if (!(ptr=start=(TABLE**) sql_alloc(sizeof(TABLE*) * counter))) - return -1; - - for (table= tables; table; table= table->next_global) - { - if (!table->placeholder() && !table->schema_table) - *(ptr++)= table->table; - } - - for (i=1 ; i <= counter ; i++, start++) - { - DBUG_ASSERT((*start)->reginfo.lock_type >= TL_READ); - lock_type=F_WRLCK; /* Lock exclusive */ - - if ((*start)->db_stat & HA_READ_ONLY || - ((*start)->reginfo.lock_type >= TL_READ && - (*start)->reginfo.lock_type <= TL_READ_NO_INSERT)) - lock_type=F_RDLCK; - - if ((error=(*start)->file->transactional_table_lock(thd, lock_type))) - { - print_lock_error(error, (*start)->file->table_type()); - DBUG_RETURN(-1); - } - else - { - (*start)->db_stat &= ~ HA_BLOCK_LOCK; - (*start)->current_lock= lock_type; - } - } - - DBUG_RETURN(0); -} |