diff options
| author | ilotterytea <iltsu@alright.party> | 2025-07-04 03:16:23 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-07-04 03:16:23 +0500 |
| commit | db23d7a064db7f5a5c9a5306880e48c709b7d68b (patch) | |
| tree | 54c1f7d0fb766d48ba2e0bbc574569e61acbd685 | |
| parent | 76f4b021b087060116c22412f59dd3266c80c39b (diff) | |
fix: use MARIADB_BASE_VERSION for db version check
| -rw-r--r-- | bot/src/database.hpp | 12 |
1 files 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<MYSQL_BIND> bind_res(num_fields); std::vector<std::string> bufs(num_fields); std::vector<unsigned long> lengths_out(num_fields); -#if MYSQL_VERSION_ID >= 80000 - std::vector<bool *> is_null(num_fields); -#else +#ifdef MARIADB_BASE_VERSION std::vector<my_bool> is_null(num_fields); +#else + std::vector<bool *> 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<bool *>(&is_null[i]); -#else +#ifdef MARIADB_BASE_VERSION bind_res[i].is_null = &is_null[i]; +#else + bind_res[i].is_null = reinterpret_cast<bool *>(&is_null[i]); #endif } |
