Use on-disk database for MySQLAuth users

The SQLite database is now always created on disk. This will remove the
need to dump the database users from the in-memory database to the
persisted on-disk database.

This change will also make the authentication compatible with older SQLite
implementations which lack the URI-based database strings found in newer
versions.
This commit is contained in:
Markus Mäkelä
2017-02-10 16:14:06 +02:00
parent 71b3ee70a4
commit 405b944abb
4 changed files with 122 additions and 176 deletions

View File

@ -1,4 +1,8 @@
add_library(MySQLAuth SHARED mysql_auth.c dbusers.c)
target_link_libraries(MySQLAuth maxscale-common MySQLCommon sqlite3)
set_target_properties(MySQLAuth PROPERTIES VERSION "1.0.0")
install_module(MySQLAuth core)
if(SQLITE_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "SQLite version 3.3 or higher is required")
else()
add_library(MySQLAuth SHARED mysql_auth.c dbusers.c)
target_link_libraries(MySQLAuth maxscale-common MySQLCommon sqlite3)
set_target_properties(MySQLAuth PROPERTIES VERSION "1.0.0")
install_module(MySQLAuth core)
endif()