diff options
| author | 2019-07-16 15:11:21 +0100 | |
|---|---|---|
| committer | 2019-07-16 16:48:18 +0100 | |
| commit | cd8b456f979733525941284639d8bf899173b429 (patch) | |
| tree | f1d26962e61c74c5acb076662a909beafbe8e5fd /src/modules/extra/m_mysql.cpp | |
| parent | Replace socketengine_{pthread,win32} with C++11 threads. (diff) | |
| parent | ssl_gnutls: remove PackageInfo directives for EOL Debian versions. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/extra/m_mysql.cpp')
| -rw-r--r-- | src/modules/extra/m_mysql.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 20f9f23cd..90ed1a82c 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -22,17 +22,25 @@ /// $CompilerFlags: execute("mysql_config --include" "MYSQL_CXXFLAGS") /// $LinkerFlags: execute("mysql_config --libs_r" "MYSQL_LDFLAGS" "-lmysqlclient") +/// $PackageInfo: require_system("arch") mariadb-libs /// $PackageInfo: require_system("centos" "6.0" "6.99") mysql-devel /// $PackageInfo: require_system("centos" "7.0") mariadb-devel /// $PackageInfo: require_system("darwin") mysql-connector-c /// $PackageInfo: require_system("debian") libmysqlclient-dev /// $PackageInfo: require_system("ubuntu") libmysqlclient-dev +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif #include "inspircd.h" #include <mysql.h> #include "modules/sql.h" +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #ifdef _WIN32 # pragma comment(lib, "libmysql.lib") #endif @@ -61,7 +69,7 @@ * The ircd thread then mutexes the queue once more, reads the outbound response off the head * of the queue, and sends it on its way to the original calling module. * - * XXX: You might be asking "why doesnt he just send the response from within the worker thread?" + * XXX: You might be asking "why doesnt it just send the response from within the worker thread?" * The answer to this is simple. The majority of InspIRCd, and in fact most ircd's are not * threadsafe. This module is designed to be threadsafe and is careful with its use of threads, * however, if we were to call a module's OnRequest even from within a thread which was not the @@ -327,6 +335,7 @@ class SQLConnection : public SQL::Provider void Submit(SQL::Query* q, const std::string& qs) override { + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Executing MySQL query: " + qs); Parent()->Dispatcher->LockQueue(); Parent()->qq.push_back(QQueueItem(q, qs, this)); Parent()->Dispatcher->UnlockQueueWakeup(); |
