summaryrefslogtreecommitdiffabout
path: root/src/dbrw.h
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-11 19:11:37 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-11-11 22:10:27 (GMT)
commit5d91de768f4a5f75f6b663e7d80c94f47e45de23 (patch) (side-by-side diff)
tree8d07950953625faa8c9852379c071c7ea454b8c9 /src/dbrw.h
parent55e620d377854d7416ee63d8e2d91905e78b421b (diff)
downloadvmod-dbrw-5d91de768f4a5f75f6b663e7d80c94f47e45de23.tar.gz
vmod-dbrw-5d91de768f4a5f75f6b663e7d80c94f47e45de23.tar.bz2
Add test suite.
* Makefile.am: Add tests subdir * configure.ac: Initialize testsuite. (DBRW_TEST_PARAMS,DBRW_TEST_SERVER) (DBRW_TEST_NAME,DBRW_TEST_USER) (DBRW_TEST_PASS,DBRW_TEST_DEBUG): New variables. * src/Makefile.am (noinst_LTLIBRARIES): New library libsql.la * src/dbrw.h (dbrw_backend_select): New proto. * src/be.c: New file. * src/mysql.c (check_errno): Add default clause. * src/vmod_dbrw.c (expand_backref): Fix memory deallocation error. (dbrw_sethdr): New function. (findmatch): Use dbrw_sethdr to set X-VMOD-DBRW-Status * tests/.gitignore: New file. * tests/initdb.c: New file. * tests/Makefile.am: New file. * tests/atlocal.in: New file. * tests/exact01.at: New file. * tests/initdb.at: New file. * tests/rewrite01.at: New file. * tests/rewrite02.at: New file. * tests/rewrite03.at: New file. * tests/rewrite04.at: New file. * tests/rewrite05.at: New file. * tests/rewrite06.at: New file. * tests/testsuite.at: New file.
Diffstat (limited to 'src/dbrw.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/dbrw.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dbrw.h b/src/dbrw.h
index 7dd6606..855720a 100644
--- a/src/dbrw.h
+++ b/src/dbrw.h
@@ -79,7 +79,7 @@ struct dbrw_backend mysql_backend;
struct dbrw_backend pgsql_backend;
#endif
-char *findparam(char **params, char *name);
+struct dbrw_backend *dbrw_backend_select(const char *name);
int sql_init(struct dbrw_connection *);
int sql_connect(struct dbrw_connection *pd);
@@ -92,3 +92,5 @@ void sql_free_result(struct dbrw_connection *pd);
void sql_destroy(struct dbrw_connection *pd);
const char *sql_get_column(struct dbrw_connection *pd, unsigned row, unsigned col);
+char *findparam(char **params, char *name);
+

Return to:

Send suggestions and report system problems to the System administrator.