|
drizzle
C++ MySQL-protocol-compatible database server
|
Variables | |
| static drizzled::error_t | drizzled::thr_lock_errno_to_mysql [] |
| volatile uint32_t | drizzled::global_read_lock =0 |
| volatile uint32_t | drizzled::global_read_lock_blocks_commit =0 |
| static volatile uint32_t | drizzled::protect_against_global_read_lock =0 |
| static volatile uint32_t | drizzled::waiting_for_read_lock =0 |
| void drizzled::Session::abortLock | ( | Table * | table | ) |
| bool drizzled::Session::abortLockForThread | ( | Table * | table | ) |
| void drizzled::locking::broadcast_refresh | ( | void | ) |
Broadcast COND_refresh and COND_global_read_lock.
Due to a bug in a threading library it could happen that a signal did not reach its target. A condition for this was that the same condition variable was used with different mutexes in pthread_cond_wait(). Some time ago we changed table::Cache::mutex() to LOCK_global_read_lock in global read lock handling. So COND_refresh was used with table::Cache::mutex() and LOCK_global_read_lock.
We did now also change from COND_refresh to COND_global_read_lock in global read lock handling. But now it is necessary to signal both conditions at the same time.
|
private |
Get lock structures from table structs and initialize locks.
| session | Thread handler |
| table_ptr | Pointer to tables that should be locks |
| should_lock | One of:
|
| write_lock_used | Store pointer to last table with WRITE_ALLOW_WRITE |
|
private |
| int drizzled::Session::lock_table_name | ( | TableList * | table_list | ) |
Put a not open table with an old refresh version in the table cache.
| table_list | Lock first table in this list |
| check_in_use | Do we need to check if table already in use by us |
0 table locked, but someone is using it
| bool drizzled::Session::lock_table_names | ( | TableList * | table_list | ) |
| bool drizzled::Session::lock_table_names_exclusively | ( | TableList * | table_list | ) |
Unlock all tables in list with a name lock.
| table_list | Names of tables to lock. |
| TRUE | An error occured. |
| FALSE | Name lock successfully acquired. |
|
static |
| DrizzleLock * drizzled::Session::lockTables | ( | Table ** | tables, |
| uint32_t | count, | ||
| uint32_t | flags ) |
| bool drizzled::Session::makeGlobalReadLockBlockCommit | ( | ) |
|
inlinestatic |
|
static |
| void drizzled::Session::removeLock | ( | Table * | table | ) |
Try to find the table in the list of locked tables. In case of success, unlock the table and remove it from this list.
| session | thread context |
| locked | list of locked tables |
| table | the table to unlock |
| always_unlock | specify explicitly if the legacy side effect is desired. |
|
static |
Reset lock type in lock data and free.
| mysql_lock | Lock structures to reset. |
|
private |
| void drizzled::TableList::unlock_table_names | ( | TableList * | last_table = NULL | ) |
Unlock all tables in list with a name lock.
| table_list | Names of tables to unlock |
| last_table | Don't unlock any tables after this one. (default 0, which will unlock all tables) |
| 0 | ok |
| 1 | Fatal error (end of memory ?) |
| void drizzled::Session::unlockReadTables | ( | DrizzleLock * | sql_lock | ) |
| void drizzled::Session::unlockSomeTables | ( | Table ** | table, |
| uint32_t | count ) |
| void drizzled::Session::unlockTables | ( | DrizzleLock * | sql_lock | ) |
|
private |
| bool drizzled::Session::wait_if_global_read_lock | ( | bool | abort_on_refresh, |
| bool | is_not_commit ) |
| volatile uint32_t drizzled::global_read_lock_blocks_commit =0 |
|
static |
|
static |