From db23d7a064db7f5a5c9a5306880e48c709b7d68b Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 4 Jul 2025 03:16:23 +0500 Subject: fix: use MARIADB_BASE_VERSION for db version check --- bot/src/database.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/src/database.hpp b/bot/src/database.hpp index 1958428..118da19 100644 --- a/bot/src/database.hpp +++ b/bot/src/database.hpp @@ -209,10 +209,10 @@ namespace bot::db { std::vector bind_res(num_fields); std::vector bufs(num_fields); std::vector lengths_out(num_fields); -#if MYSQL_VERSION_ID >= 80000 - std::vector is_null(num_fields); -#else +#ifdef MARIADB_BASE_VERSION std::vector is_null(num_fields); +#else + std::vector is_null(num_fields); #endif for (int i = 0; i < num_fields; i++) { @@ -222,10 +222,10 @@ namespace bot::db { bind_res[i].buffer = bufs[i].data(); bind_res[i].buffer_length = bufs[i].size(); bind_res[i].length = &lengths_out[i]; -#if MYSQL_VERSION_ID >= 80000 - bind_res[i].is_null = reinterpret_cast(&is_null[i]); -#else +#ifdef MARIADB_BASE_VERSION bind_res[i].is_null = &is_null[i]; +#else + bind_res[i].is_null = reinterpret_cast(&is_null[i]); #endif } -- cgit v1.2.3