最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

<-
Apache > HTTP Server > 文檔 > 版本2.2 > 模塊
   致謝 | 譯者聲明 | 本篇譯者:<虛位以待> | 本篇譯稿完成時間:?年?月?日 | 獲取最新版本

Apache模塊 mod_dbd

說明管理SQL數(shù)據(jù)庫連接,為需要數(shù)據(jù)庫功能的模塊提供支持
狀態(tài)擴展(E)
模塊名dbd_module
源文件mod_dbd.c
兼容性Version 2.1 及以后的版本中可用

概述

mod_dbd manages SQL database connections using apr_dbd. It provides database connections on request to modules requiring SQL database functions, and takes care of managing databases with optimal efficiency and scalability for both threaded and non-threaded MPMs.

top

Connection Pooling

This module manages database connections, in a manner optimised for the platform. On non-threaded platforms, it provides a persistent connection in the manner of classic LAMP (Linux, Apache, Mysql, Perl/PHP/Python). On threaded platform, it provides an altogether more scalable and efficient connection pool, as described in this article at ApacheTutor. mod_dbd supersedes the modules presented in that article.

top

Apache DBD API

mod_dbd exports five functions for other modules to use. The API is as follows:

typedef struct {
    apr_dbd_t *handle;
    apr_dbd_driver_t *driver;
    apr_hash_t *prepared;
} ap_dbd_t;

/* Export functions to access the database */

/* acquire a connection that MUST be explicitly closed.
 * Returns NULL on error
 */
AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*);

/* release a connection acquired with ap_dbd_open */
AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*);

/* acquire a connection that will have the lifetime of a request
 * and MUST NOT be explicitly closed.  Return NULL on error.
 * This is the preferred function for most applications.
 */
AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);

/* acquire a connection that will have the lifetime of a connection
 * and MUST NOT be explicitly closed.  Return NULL on error.
 */
AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(request_rec*);

/* Prepare a statement for use by a client module */
AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);

/* Also export them as optional functions for modules that prefer it */
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
top

SQL Prepared Statements

mod_dbd supports SQL prepared statements on behalf of modules that may wish to use them. Each prepared statement must be assigned a name (label), and they are stored in a hash: the prepared field of an ap_dbd_t. Hash entries are of type apr_dbd_prepared_t and can be used in any of the apr_dbd prepared statement SQL query or select commands.

It is up to dbd user modules to use the prepared statements and document what statements can be specified in httpd.conf, or to provide their own directives and use ap_dbd_prepare.

top

DBDExptime 指令

說明Keepalive time for idle connections
語法DBDExptime time-in-seconds
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

Set the time to keep idle connections alive where the number of connections specified in DBDKeep has been exceeded (threaded platforms only).

top

DBDKeep 指令

說明Maximum sustainednumber of connections
語法DBDKeep number
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

Set the maximum number of connections per process to be sustained, other than for handling peak demand (threaded platforms only).

top

DBDMax 指令

說明Maximum number of connections
語法DBDMax number
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

Set the hard maximum number of connections per process (threaded platforms only).

top

DBDMin 指令

說明Minimum number of connections
語法DBDMin number
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

Set the minimum number of connections per process (threaded platforms only).

top

DBDParams 指令

說明Parameters for database connection
語法DBDParams param1=value1[,param2=value2]
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

As required by the underlying driver. Typically this will be used to pass whatever cannot be defaulted amongst username, password, database name, hostname and port number for connection.

top

DBDPersist 指令

說明Whether to use persistent connections
語法DBDPersist 0|1
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

If set to 0, persistent and pooled connections are disabled. A new database connection is opened when requested by a client, and closed immediately on release. This option is for debugging and low-usage servers.

The default is to enable a pool of persistent connections (or a single LAMP-style persistent connection in the case of a non-threaded server), and should almost always be used in operation.

top

DBDPrepareSQL 指令

說明Define an SQL prepared statement
語法DBDPrepareSQL "SQL statement" label
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

For modules such as authentication that use repeatedly use a single SQL statement, optimum performance is achieved by preparing the statement at startup rather than every time it is used. This directive prepares an SQL statement and assigns it a label.

top

DBDriver 指令

說明Specify an SQL driver
語法DBDriver name
作用域server config, virtual host
狀態(tài)擴展(E)
模塊mod_dbd

Selects an apr_dbd driver by name. The driver must be installed on your system (on most systems, it will be a shared object or dll). For example, DBDriver mysql will select the MySQL driver in apr_dbd_mysql.so.

搜索| 青州市| 河池市| 桦川县| 松溪县| 桂东县| 桐柏县| 茂名市| 商城县| 林州市| 凤阳县| 饶河县| 关岭| 璧山县| 南丰县| 拜城县| 西林县| 沂水县| 巴中市| 深州市| 临清市| 尉氏县| 封丘县| 呼伦贝尔市| 云南省| 无为县| 惠水县| 康平县| 楚雄市| 苍山县| 阿荣旗| 林芝县| 三穗县| 长武县| 漯河市| 五寨县| 柳林县| 道真| 阿合奇县| 济南市| 镇沅|