Skip to content

Commit

Permalink
[mysql] alternative for deprecated or removed methods in v8 (#14378)
Browse files Browse the repository at this point in the history
* [sql] alternative for deprecated or removed methods

Fixes #14376

See https://dev.mysql.com/doc/relnotes/mysql/8.3/en/news-8-3-0.html#mysqld-8-3-0-deprecation-removal

* fix syntax
  • Loading branch information
ferdymercury authored and linev committed Jan 19, 2024
1 parent ab4e9b0 commit 560a615
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sql/mysql/src/TMySQLServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,13 @@ Int_t TMySQLServer::Reload()
{
CheckConnect("Reload", -1);

Int_t res = mysql_reload(fMySQL);
Int_t res;

#if MYSQL_VERSION_ID >= 80000
res = mysql_query(fMySQL, "FLUSH PRIVILEGES");
#else
res = mysql_reload(fMySQL);
#endif

CheckErrNo("Reload", kFALSE, res);

Expand All @@ -656,7 +662,9 @@ Int_t TMySQLServer::Shutdown()

Int_t res;

#if MYSQL_VERSION_ID >= 50001 || \
#if MYSQL_VERSION_ID >= 80000
res = mysql_query(fMySQL, "SHUTDOWN");
#elif MYSQL_VERSION_ID >= 50001 || \
(MYSQL_VERSION_ID < 50000 && MYSQL_VERSION_ID >= 40103)
res = mysql_shutdown(fMySQL, SHUTDOWN_DEFAULT);
#else
Expand Down

0 comments on commit 560a615

Please sign in to comment.