diff --git a/include/maxscale/modinfo.h b/include/maxscale/modinfo.h index 40789eecc..c78daaace 100644 --- a/include/maxscale/modinfo.h +++ b/include/maxscale/modinfo.h @@ -14,14 +14,6 @@ /** * @file modinfo.h The module information interface - * - * @verbatim - * Revision History - * - * Date Who Description - * 02/06/14 Mark Riddoch Initial implementation - * - * @endverbatim */ #include @@ -114,15 +106,53 @@ typedef struct mxs_module_param /** * The module information structure */ -typedef struct +typedef struct mxs_module { MXS_MODULE_API modapi; /**< Module API type */ MXS_MODULE_STATUS status; /**< Module development status */ MXS_MODULE_VERSION api_version; /**< Module API version */ - const char *description; /**< Module description */ - const char *version; /**< Module version */ - void *module_object; /**< Module type specific API implementation */ - MXS_MODULE_PARAM parameters[]; /**< Declared parameters */ + const char *description; /**< Module description */ + const char *version; /**< Module version */ + void *module_object; /**< Module type specific API implementation */ + /** + * If non-NULL, this function is called once at process startup. If the + * function fails, MariaDB MaxScale will not start. + * + * @return 0 on success, non-zero on failure. + */ + int (*init)(); + + /** + * If non-NULL, this function is called once at process shutdown, provided + * the call to @c init succeeded. + */ + void (*finish)(); + + /** + * If non-NULL, this function is called once at the startup of every new thread. + * If the function fails, then the thread will terminate. + * + * @attention This function is *not* called for the thread where @c init is called. + * + * @return 0 on success, non-zero on failure. + */ + int (*thread_init)(); + + /** + * If non-NULL, this function is called when a thread terminates, provided the + * call to @c thread_init succeeded. + * + * @attention This function is *not* called for the thread where @c init is called. + */ + void (*thread_finish)(); + +#ifdef __cplusplus + // TODO: C++ does not have flexible arrays, so for the time being C++ modules + // TODO: are restricted to 10 parameters. + MXS_MODULE_PARAM parameters[11]; /**< Declared parameters */ +#else + MXS_MODULE_PARAM parameters[]; /**< Declared parameters */ +#endif } MXS_MODULE; /** diff --git a/query_classifier/qc_dummy/qc_dummy.cc b/query_classifier/qc_dummy/qc_dummy.cc index 9cf3a91b5..946c93a9a 100644 --- a/query_classifier/qc_dummy/qc_dummy.cc +++ b/query_classifier/qc_dummy/qc_dummy.cc @@ -11,6 +11,7 @@ * Public License. */ +#define MXS_MODULE_NAME "qc_sqlite" #include #include @@ -127,7 +128,14 @@ extern "C" QUERY_CLASSIFIER_VERSION, "Dummy Query Classifier", "V1.0.0", - &qc + &qc, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc index b82fddb51..9366d0b01 100644 --- a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc +++ b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc @@ -2587,7 +2587,14 @@ MXS_MODULE* MXS_CREATE_MODULE() QUERY_CLASSIFIER_VERSION, "Query classifier based upon MySQL Embedded", "V1.0.0", - &qc + &qc, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/query_classifier/qc_sqlite/qc_sqlite.c b/query_classifier/qc_sqlite/qc_sqlite.c index eb3ef989e..cbd33a078 100644 --- a/query_classifier/qc_sqlite/qc_sqlite.c +++ b/query_classifier/qc_sqlite/qc_sqlite.c @@ -3202,7 +3202,14 @@ MXS_MODULE* MXS_CREATE_MODULE() QUERY_CLASSIFIER_VERSION, "Query classifier using sqlite.", "V1.0.0", - &qc + &qc, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c b/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c index 6f6605d69..8c6438116 100644 --- a/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c +++ b/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c @@ -173,7 +173,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The CDC client to MaxScale authenticator implementation", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c index 8cb3562ca..0f1740b74 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c +++ b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c @@ -619,7 +619,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "GSSAPI authenticator", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c index 12a586fec..aa9f0aca0 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c +++ b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c @@ -284,7 +284,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "GSSAPI backend authenticator", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/HTTPAuth/http_auth.c b/server/modules/authenticator/HTTPAuth/http_auth.c index 5758e3144..fcd5efeec 100644 --- a/server/modules/authenticator/HTTPAuth/http_auth.c +++ b/server/modules/authenticator/HTTPAuth/http_auth.c @@ -74,7 +74,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The MaxScale HTTP BA authenticator", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c index cfa965603..0888e66b5 100644 --- a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c +++ b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c @@ -68,7 +68,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The MaxScale Admin client authenticator implementation", "V2.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/MySQLAuth/mysql_auth.c b/server/modules/authenticator/MySQLAuth/mysql_auth.c index 660f2697c..17ed4d237 100644 --- a/server/modules/authenticator/MySQLAuth/mysql_auth.c +++ b/server/modules/authenticator/MySQLAuth/mysql_auth.c @@ -92,7 +92,12 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The MySQL client to MaxScale authenticator implementation", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { { MXS_END_MODULE_PARAMS} } }; return &info; diff --git a/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c b/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c index d783c1603..c7fb10972 100644 --- a/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c +++ b/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c @@ -177,7 +177,14 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The MySQL MaxScale to backend server authenticator", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/authenticator/NullAuthAllow/null_auth_allow.c b/server/modules/authenticator/NullAuthAllow/null_auth_allow.c index 58d13ce95..98d468dda 100644 --- a/server/modules/authenticator/NullAuthAllow/null_auth_allow.c +++ b/server/modules/authenticator/NullAuthAllow/null_auth_allow.c @@ -70,7 +70,14 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The Null client authenticator implementation", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/authenticator/NullAuthDeny/null_auth_deny.c b/server/modules/authenticator/NullAuthDeny/null_auth_deny.c index 007112957..b019ada95 100644 --- a/server/modules/authenticator/NullAuthDeny/null_auth_deny.c +++ b/server/modules/authenticator/NullAuthDeny/null_auth_deny.c @@ -67,7 +67,14 @@ MXS_MODULE* MXS_CREATE_MODULE() GWAUTHENTICATOR_VERSION, "The Null client authenticator implementation", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/cache/cachefilter.cc b/server/modules/filter/cache/cachefilter.cc index 2af357d3b..6cc6a1964 100644 --- a/server/modules/filter/cache/cachefilter.cc +++ b/server/modules/filter/cache/cachefilter.cc @@ -200,10 +200,10 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() { MODULECMD_ARG_OUTPUT, "The output dcb" }, { MODULECMD_ARG_FILTER, "Cache name" } }; - + modulecmd_register_command("cache", "show", cache_command_show, MXS_ARRAY_NELEMS(show_argv), show_argv); - + MXS_NOTICE("Initialized cache module %s.\n", VERSION_STRING); static MXS_MODULE info = @@ -213,7 +213,14 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A caching filter that is capable of caching and returning cached data.", VERSION_STRING, - &CacheFilter::s_object + &CacheFilter::s_object, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/ccrfilter/ccrfilter.c b/server/modules/filter/ccrfilter/ccrfilter.c index e019e2fed..89eba5d5a 100644 --- a/server/modules/filter/ccrfilter/ccrfilter.c +++ b/server/modules/filter/ccrfilter/ccrfilter.c @@ -123,7 +123,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A routing hint filter that send queries to the master after data modification", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.c b/server/modules/filter/dbfwfilter/dbfwfilter.c index 733413115..0fd3e7da2 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.c +++ b/server/modules/filter/dbfwfilter/dbfwfilter.c @@ -817,7 +817,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "Firewall Filter", "V1.2.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/hintfilter/hintfilter.c b/server/modules/filter/hintfilter/hintfilter.c index de560a0d2..493014283 100644 --- a/server/modules/filter/hintfilter/hintfilter.c +++ b/server/modules/filter/hintfilter/hintfilter.c @@ -64,7 +64,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A hint parsing filter", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/luafilter/luafilter.c b/server/modules/filter/luafilter/luafilter.c index d0dd50677..0d2718ee1 100644 --- a/server/modules/filter/luafilter/luafilter.c +++ b/server/modules/filter/luafilter/luafilter.c @@ -96,7 +96,15 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "Lua Filter", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Parameters */ + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/masking/maskingfilter.cc b/server/modules/filter/masking/maskingfilter.cc index 6b167975c..97d7ea9c3 100644 --- a/server/modules/filter/masking/maskingfilter.cc +++ b/server/modules/filter/masking/maskingfilter.cc @@ -29,7 +29,14 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A masking filter that is capable of masking/obfuscating returned column values.", "V1.0.0", - &MaskingFilter::s_object + &MaskingFilter::s_object, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/maxrows/maxrows.c b/server/modules/filter/maxrows/maxrows.c index ee964105f..d7aae3bee 100644 --- a/server/modules/filter/maxrows/maxrows.c +++ b/server/modules/filter/maxrows/maxrows.c @@ -88,7 +88,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A filter that is capable of limiting the resultset number of rows.", "V1.0.0", - &object + &object, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/mqfilter/mqfilter.c b/server/modules/filter/mqfilter/mqfilter.c index c38099c56..b0a2d60dd 100644 --- a/server/modules/filter/mqfilter/mqfilter.c +++ b/server/modules/filter/mqfilter/mqfilter.c @@ -269,7 +269,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A RabbitMQ query logging filter", "V1.0.2", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/namedserverfilter/namedserverfilter.c b/server/modules/filter/namedserverfilter/namedserverfilter.c index 03f62dc0b..2e50220b9 100644 --- a/server/modules/filter/namedserverfilter/namedserverfilter.c +++ b/server/modules/filter/namedserverfilter/namedserverfilter.c @@ -104,7 +104,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A routing hint filter that uses regular expressions to direct queries", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/qlafilter/qlafilter.c b/server/modules/filter/qlafilter/qlafilter.c index 3aa67af60..51d9094e5 100644 --- a/server/modules/filter/qlafilter/qlafilter.c +++ b/server/modules/filter/qlafilter/qlafilter.c @@ -163,7 +163,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A simple query logging filter", "V1.1.1", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/regexfilter/regexfilter.c b/server/modules/filter/regexfilter/regexfilter.c index 662c0b760..086e9c450 100644 --- a/server/modules/filter/regexfilter/regexfilter.c +++ b/server/modules/filter/regexfilter/regexfilter.c @@ -114,7 +114,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A query rewrite filter that uses regular expressions to rewrite queries", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/tee/tee.c b/server/modules/filter/tee/tee.c index 49b372fa6..3bf76fb76 100644 --- a/server/modules/filter/tee/tee.c +++ b/server/modules/filter/tee/tee.c @@ -318,7 +318,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A tee piece in the filter plumbing", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/testfilter/testfilter.c b/server/modules/filter/testfilter/testfilter.c index c23d17a38..3312eabeb 100644 --- a/server/modules/filter/testfilter/testfilter.c +++ b/server/modules/filter/testfilter/testfilter.c @@ -93,7 +93,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A simple query counting filter", "V2.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/topfilter/topfilter.c b/server/modules/filter/topfilter/topfilter.c index ff247ac6e..bb16e8881 100644 --- a/server/modules/filter/topfilter/topfilter.c +++ b/server/modules/filter/topfilter/topfilter.c @@ -147,7 +147,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "A top N query logging filter", "V1.0.1", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/filter/tpmfilter/tpmfilter.c b/server/modules/filter/tpmfilter/tpmfilter.c index 73fc4b6b0..3afc44369 100644 --- a/server/modules/filter/tpmfilter/tpmfilter.c +++ b/server/modules/filter/tpmfilter/tpmfilter.c @@ -166,7 +166,14 @@ MXS_MODULE* MXS_CREATE_MODULE() FILTER_VERSION, "Transaction Performance Monitoring filter", "V1.0.1", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/monitor/auroramon/auroramon.c b/server/modules/monitor/auroramon/auroramon.c index 44da361a2..e2bead57f 100644 --- a/server/modules/monitor/auroramon/auroramon.c +++ b/server/modules/monitor/auroramon/auroramon.c @@ -360,7 +360,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MONITOR_VERSION, "Aurora monitor", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/monitor/galeramon/galeramon.c b/server/modules/monitor/galeramon/galeramon.c index 374c12915..96c0193da 100644 --- a/server/modules/monitor/galeramon/galeramon.c +++ b/server/modules/monitor/galeramon/galeramon.c @@ -78,6 +78,10 @@ MXS_MODULE* MXS_CREATE_MODULE() "A Galera cluster monitor", "V2.0.0", &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ { {"disable_master_failback", MXS_MODULE_PARAM_BOOL, "false"}, {"available_when_donor", MXS_MODULE_PARAM_BOOL, "false"}, diff --git a/server/modules/monitor/mmmon/mmmon.c b/server/modules/monitor/mmmon/mmmon.c index 99d2ca004..7515e26cc 100644 --- a/server/modules/monitor/mmmon/mmmon.c +++ b/server/modules/monitor/mmmon/mmmon.c @@ -79,6 +79,10 @@ MXS_MODULE* MXS_CREATE_MODULE() "A Multi-Master Multi Master monitor", "V1.1.1", &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ { {"detect_stale_master", MXS_MODULE_PARAM_BOOL, "false"}, {MXS_END_MODULE_PARAMS} diff --git a/server/modules/monitor/mysqlmon/mysql_mon.c b/server/modules/monitor/mysqlmon/mysql_mon.c index 22bc90b02..944109ebb 100644 --- a/server/modules/monitor/mysqlmon/mysql_mon.c +++ b/server/modules/monitor/mysqlmon/mysql_mon.c @@ -113,6 +113,10 @@ MXS_MODULE* MXS_CREATE_MODULE() "A MySQL Master/Slave replication monitor", "V1.5.0", &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ { {"detect_replication_lag", MXS_MODULE_PARAM_BOOL, "false"}, {"detect_stale_master", MXS_MODULE_PARAM_BOOL, "true"}, diff --git a/server/modules/monitor/ndbclustermon/ndbclustermon.c b/server/modules/monitor/ndbclustermon/ndbclustermon.c index a3f03664a..9c3c8db86 100644 --- a/server/modules/monitor/ndbclustermon/ndbclustermon.c +++ b/server/modules/monitor/ndbclustermon/ndbclustermon.c @@ -72,6 +72,10 @@ MXS_MODULE* MXS_CREATE_MODULE() "A MySQL cluster SQL node monitor", "V2.1.0", &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ { {MXS_END_MODULE_PARAMS} // No parameters } diff --git a/server/modules/protocol/CDC/cdc.c b/server/modules/protocol/CDC/cdc.c index ac5b6529e..6acb8b7e9 100644 --- a/server/modules/protocol/CDC/cdc.c +++ b/server/modules/protocol/CDC/cdc.c @@ -92,7 +92,15 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_MODULE_IN_DEVELOPMENT, MXS_PROTOCOL_VERSION, "A Change Data Capture Listener implementation for use in binlog events retrieval", - "V1.0.0" + "V1.0.0", + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/protocol/HTTPD/httpd.c b/server/modules/protocol/HTTPD/httpd.c index 04882ed22..ec4142e32 100644 --- a/server/modules/protocol/HTTPD/httpd.c +++ b/server/modules/protocol/HTTPD/httpd.c @@ -89,7 +89,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "An experimental HTTPD implementation for use in administration", "V1.2.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c index 31e5efc7b..5d40b92ff 100644 --- a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c @@ -111,7 +111,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "The MySQL to backend server protocol", "V2.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c index 2ad2e41f5..9156ccc77 100644 --- a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c +++ b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c @@ -119,7 +119,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "The client to MaxScale MySQL protocol implementation", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/protocol/maxscaled/maxscaled.c b/server/modules/protocol/maxscaled/maxscaled.c index e5665d0ec..74d1ebeb4 100644 --- a/server/modules/protocol/maxscaled/maxscaled.c +++ b/server/modules/protocol/maxscaled/maxscaled.c @@ -192,7 +192,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "A maxscale protocol for the administration interface", "V2.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/protocol/telnetd/telnetd.c b/server/modules/protocol/telnetd/telnetd.c index 3c2d292de..054eab4f7 100644 --- a/server/modules/protocol/telnetd/telnetd.c +++ b/server/modules/protocol/telnetd/telnetd.c @@ -109,7 +109,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "A telnet deamon protocol for simple administration interface", "V1.1.1", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; } diff --git a/server/modules/protocol/testprotocol/testprotocol.c b/server/modules/protocol/testprotocol/testprotocol.c index df2e0cbab..6331cfd2c 100644 --- a/server/modules/protocol/testprotocol/testprotocol.c +++ b/server/modules/protocol/testprotocol/testprotocol.c @@ -78,7 +78,14 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_PROTOCOL_VERSION, "Test protocol", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/avrorouter/avro.c b/server/modules/routing/avrorouter/avro.c index 1b3e5fc94..e63d1f798 100644 --- a/server/modules/routing/avrorouter/avro.c +++ b/server/modules/routing/avrorouter/avro.c @@ -161,6 +161,10 @@ MXS_MODULE* MXS_CREATE_MODULE() "Binlogrouter", "V1.0.0", &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ { { "binlogdir", diff --git a/server/modules/routing/binlogrouter/blr.c b/server/modules/routing/binlogrouter/blr.c index c88b94796..1e27c9955 100644 --- a/server/modules/routing/binlogrouter/blr.c +++ b/server/modules/routing/binlogrouter/blr.c @@ -161,7 +161,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "Binlogrouter", "V2.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/cli/cli.c b/server/modules/routing/cli/cli.c index bf0b17c5a..5f0f555ca 100644 --- a/server/modules/routing/cli/cli.c +++ b/server/modules/routing/cli/cli.c @@ -89,7 +89,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "The admin user interface", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/debugcli/debugcli.c b/server/modules/routing/debugcli/debugcli.c index 5f6d92f2f..28f9c84b3 100644 --- a/server/modules/routing/debugcli/debugcli.c +++ b/server/modules/routing/debugcli/debugcli.c @@ -88,7 +88,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "The debug user interface", "V1.1.1", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/maxinfo/maxinfo.c b/server/modules/routing/maxinfo/maxinfo.c index 5c628cd4a..6d069c6fb 100644 --- a/server/modules/routing/maxinfo/maxinfo.c +++ b/server/modules/routing/maxinfo/maxinfo.c @@ -112,7 +112,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "The MaxScale Information Schema", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/readconnroute/readconnroute.c b/server/modules/routing/readconnroute/readconnroute.c index dd4e97316..a5113067c 100644 --- a/server/modules/routing/readconnroute/readconnroute.c +++ b/server/modules/routing/readconnroute/readconnroute.c @@ -145,7 +145,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "A connection based router to load balance based on connections", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index 29b42e803..72d26f844 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -134,7 +134,14 @@ MXS_MODULE *MXS_CREATE_MODULE() MXS_MODULE_API_ROUTER, MXS_MODULE_GA, ROUTER_VERSION, "A Read/Write splitting router for enhancement read scalability", "V1.1.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; MXS_NOTICE("Initializing statement-based read/write split router module."); diff --git a/server/modules/routing/schemarouter/schemarouter.c b/server/modules/routing/schemarouter/schemarouter.c index 00f36babe..664458961 100644 --- a/server/modules/routing/schemarouter/schemarouter.c +++ b/server/modules/routing/schemarouter/schemarouter.c @@ -618,7 +618,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "A database sharding router for simple sharding", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info; diff --git a/server/modules/routing/testroute/testroute.c b/server/modules/routing/testroute/testroute.c index 1ff4dbdd5..015651d53 100644 --- a/server/modules/routing/testroute/testroute.c +++ b/server/modules/routing/testroute/testroute.c @@ -69,7 +69,14 @@ MXS_MODULE* MXS_CREATE_MODULE() ROUTER_VERSION, "A test router - not for use in real systems", "V1.0.0", - &MyObject + &MyObject, + NULL, /* Process init. */ + NULL, /* Process finish. */ + NULL, /* Thread init. */ + NULL, /* Thread finish. */ + { + {MXS_END_MODULE_PARAMS} + } }; return &info;