diff options
author | unknown <monty@donna.mysql.com> | 2001-01-14 12:25:30 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-01-14 12:25:30 +0200 |
commit | f62c9ed1e34bcacf56ed27420f2fc10a5c8a5b0f (patch) | |
tree | 2246f6c5eb1aa8db6ceeda223a34ef345f2d163a /sql/ha_berkeley.cc | |
parent | 686faae582dad736ac85144ecb4e50c1b1fe579e (diff) | |
download | mariadb-git-f62c9ed1e34bcacf56ed27420f2fc10a5c8a5b0f.tar.gz |
Fixed that --open-files-limit works on Linux
Docs/manual.texi:
Update of security and replication sections
sql/ha_berkeley.cc:
More documentation
sql/sql_base.cc:
Fixed overflow bug
sql/sql_parse.cc:
Variable name change
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 0cf789056c9..1732f77cd0a 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -119,6 +119,8 @@ bool berkeley_init(void) berkeley_tmpdir=mysql_tmpdir; if (!berkeley_home) berkeley_home=mysql_real_data_home; + DBUG_PRINT("bdb",("berkeley_home: %s",mysql_real_data_home)); + /* If we don't set set_lg_bsize() we will get into trouble when trying to use many open BDB tables. @@ -1675,6 +1677,34 @@ int ha_berkeley::external_lock(THD *thd, int lock_type) DBUG_RETURN(error); } +/* + The idea with handler::store_lock() is the following: + + The statement decided which locks we should need for the table + for updates/deletes/inserts we get WRITE locks, for SELECT... we get + read locks. + + Before adding the lock into the table lock handler (see thr_lock.c) + mysqld calls store lock with the requested locks. Store lock can now + modify a write lock to a read lock (or some other lock), ignore the + lock (if we don't want to use MySQL table locks at all) or add locks + for many tables (like we do when we are using a MERGE handler). + + Berkeley DB changes all WRITE locks to TL_WRITE_ALLOW_WRITE (which + signals that we are doing WRITES, but we are still allowing other + reader's and writer's. + + When releasing locks, store_lock() are also called. In this case one + usually doesn't have to do anything. + + In some exceptional cases MySQL may send a request for a TL_IGNORE; + This means that we are requesting the same lock as last time and this + should also be ignored. (This may happen when someone does a flush + table when we have opened a part of the tables, in which case mysqld + closes and reopens the tables and tries to get the same locks at last + time). In the future we will probably try to remove this. +*/ + THR_LOCK_DATA **ha_berkeley::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) |