[Date Prev][Date Next]
Re: back-sql development
Pierangelo Masarati wrote:
I've spent a few hours working with back-sql; I've fixed a number
of minor bugs/flaws, and written a test (./run tests031 after
configuring your choice of RDBMS).
After some reworking, now the SQL backend has its own test suite,
which is run after all of the other tests have been completed and only
if SLAPD_USE_SQL is set to the desired RDBMS. Use "make sql"
in tests/ to shortcut the SQL tests run.
SQL tests are prefixed with sql-; Currently, sql-test000-read performs
a number of read operations, while sql-test900-write performs
a number of write operations; the latter requires SLAPD_USE_SQLWRITE=yes
and should be left close to the end of the test suite because it leaves
the database in a moddified state; subsequent tests should not rely on
the status of the database, otherwise their behavior would differ if they're
run in the correct sequence or standalone.
I need help/feedback to extend the number of supported/tested RDBMSes;
right now, I've tested it only with PostgreSQL (read/write) and MySQL
(read); in the (near) future I'll only have a chance to test it with
If anybody is interested in contributing to back-sql, please, follow the
instructions in servers/slapd/back-sql/rdbms_depend/README, or
add more if your RDBMS is not listed there; then add your RDBM
tests/scripts/test031-sql and tests/data/slapd-sql.conf,
if required, and report about the results.
Hacking essentially consists in:
- adding the RDBMS nickname in the "case" statement of
scripts/sql-test900-write to enable the write tests, if applicable.
- adding specific directives, prepended by "#rdbms#,
to data/slapd-sql.conf if required.
- follow servers/slapd/back-sql/rdbms_depend/pgsql/* as guidelines
to providing consistent data to pass throughout the existing tests
feel free to prepare your own tests; it would be great if they can be
performed by all RDBMS as well (at least read-tests).
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497