Skip to content

Commit

Permalink
[database] Log warning for MySQL < 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pkerling committed Jan 15, 2019
1 parent baff0a1 commit 8cc3b28
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xbmc/dbwrappers/mysqldataset.cpp
Expand Up @@ -176,8 +176,17 @@ int MysqlDatabase::connect(bool create_new) {
static bool showed_ver_info = false;
if (!showed_ver_info)
{
CLog::Log(LOGINFO, "MYSQL: Connected to version %s", mysql_get_server_info(conn));
std::string version_string = mysql_get_server_info(conn);
CLog::Log(LOGINFO, "MYSQL: Connected to version {}", version_string);
showed_ver_info = true;
unsigned long version = mysql_get_server_version(conn);
// Minimum recommended: 5.5
unsigned long min_version = 50500;

if (version < min_version)
{
CLog::Log(LOGWARNING, "MYSQL: Your database server version {} is very old and might not be supported in future Kodi versions. Please consider upgrading to MySQL 5.7 or MariaDB 10.2.", version_string);
}
}

// disable mysql autocommit since we handle it
Expand Down

0 comments on commit 8cc3b28

Please sign in to comment.