diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-06 13:25:39 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-06 13:25:39 +0200 |
commit | 1a0f319a747220e48bde4fae8b80c0b00d22e69c (patch) | |
tree | 5912bfb14ac3d26b29eff947ded1eefa008e80be /src/sql.c | |
parent | fa78a9f21ff4fd85fb568232c9bee957b9c83497 (diff) | |
download | wydawca-1a0f319a747220e48bde4fae8b80c0b00d22e69c.tar.gz wydawca-1a0f319a747220e48bde4fae8b80c0b00d22e69c.tar.bz2 |
Improve SQL configuration.
* src/config.c (sql_kw): New statements: config-file and
config-group.
* src/sql.c (sql_init_dictionary): Handle config-file and
config-group. Set CLIENT_MULTI_RESULTS option.
* src/sql.h (struct sqlconn): New members: config_file and
config_group.
* NEWS, doc/wydawca.texi: Update.
Diffstat (limited to 'src/sql.c')
-rw-r--r-- | src/sql.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -72,2 +72,10 @@ sql_init_dictionary (struct dictionary *dict) mysql_init (&conn->mysql); + + if (conn->config_file) + mysql_options (&conn->mysql, MYSQL_READ_DEFAULT_FILE, + conn->config_file); + if (conn->config_group) + mysql_options (&conn->mysql, MYSQL_READ_DEFAULT_GROUP, + conn->config_group); + if (conn->cacert) @@ -77,3 +85,3 @@ sql_init_dictionary (struct dictionary *dict) conn->password, conn->database, conn->port, - conn->socket, 0)) + conn->socket, CLIENT_MULTI_RESULTS)) { |