From 709d2c0f5d58750a53b474889249896056c4648f Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Thu, 5 Sep 2019 12:30:07 +0200 Subject: [PATCH] Fixed/improved MySQL --- CMakeLists.txt | 1 - server/CMakeLists.txt | 3 +++ server/repro/env/libs/libmysqlcppconn.so.7 | 1 - server/src/manager/SqlDataManager.cpp | 2 +- shared | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) delete mode 120000 server/repro/env/libs/libmysqlcppconn.so.7 diff --git a/CMakeLists.txt b/CMakeLists.txt index f285d78..b68a9a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,6 @@ resolve_library(LIBRARY_TOM_MATH OFF "${LIBRARY_PATH}/tommath/bui resolve_library(LIBRARY_TOM_CRYPT OFF "${LIBRARY_PATH}/tomcrypt/libtomcrypt.a") resolve_library(LIBRARY_PATH_BREAKPAD OFF "${LIBRARY_PATH}/breakpad/build/src/client/linux/libbreakpad_client.a") resolve_library(LIBRARY_PATH_PROTOBUF OFF "${LIBRARY_PATH}/protobuf/build/libprotobuf.a") -resolve_library(LIBRARY_PATH_JDBC OFF "${LIBRARY_PATH}/mysqlconnector/build/jdbc/driver/libmysqlcppconn.so.7" "${LIBRARY_PATH}/mysqlconnector/build/jdbc/libmysqlcppconn.so.7") resolve_library(LIBRARY_PATH_BORINGSSL_SSL OFF "${LIBRARY_PATH}/boringssl/build/ssl/libssl.so") resolve_library(LIBRARY_PATH_BORINGSSL_CRYPTO OFF "${LIBRARY_PATH}/boringssl/build/crypto/libcrypto.so") resolve_library(LIBRARY_PATH_THREAD_POOL OFF "${LIBRARY_PATH}/Thread-Pool/build/libThreadPoolStatic.a") diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 32bc648..c35841c 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -274,6 +274,9 @@ target_link_libraries(TeaSpeakServer ${LIBRARY_TOM_CRYPT} ${LIBRARY_TOM_MATH} + mysqlclient.a + z + ${LIBRARY_PATH_ED255} ) diff --git a/server/repro/env/libs/libmysqlcppconn.so.7 b/server/repro/env/libs/libmysqlcppconn.so.7 deleted file mode 120000 index 9fccf81..0000000 --- a/server/repro/env/libs/libmysqlcppconn.so.7 +++ /dev/null @@ -1 +0,0 @@ -../../../../../libraries/mysqlconnector/build/jdbc/driver/libmysqlcppconn.so.7 \ No newline at end of file diff --git a/server/src/manager/SqlDataManager.cpp b/server/src/manager/SqlDataManager.cpp index f450d41..6efffa9 100644 --- a/server/src/manager/SqlDataManager.cpp +++ b/server/src/manager/SqlDataManager.cpp @@ -442,7 +442,7 @@ bool SqlDataManager::update_permissions(std::string &error) { query += "IGNORE "; else query += "OR IGNORE "; - query += "INTO `permissions` (serverId, type, id, channelId, permId, value, grant, flag_skip, flag_negate) "; + query += "INTO `permissions` (`serverId`, `type`, `id`, `channelId`, `permId`, `value`, `grant`, `flag_skip`, `flag_negate`) "; query += string() + "SELECT DISTINCT `permissions`.`serverId`, 0, `groupId`, 0, " + "'" + permission + "', " + to_string(value.has_value ? value.value : -2) + ", " diff --git a/shared b/shared index 2052317..c117799 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit 2052317e6c6feba915bdb64d4c8187ff8479e585 +Subproject commit c117799cc9b391ec8072db35bbd0558aba7dff53