You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix for CONC-505:
Don't allow to specify unsupported client flags (like CLIENT_DEPRECATE_EOF) as client flag in mysql_real_connect api function.
This commit is contained in:
@@ -1444,6 +1444,14 @@ mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
|
||||
char *connection_handler= (mysql->options.extension) ?
|
||||
mysql->options.extension->connection_handler : 0;
|
||||
|
||||
if ((client_flag & CLIENT_ALLOWED_FLAGS) != client_flag)
|
||||
{
|
||||
my_set_error(mysql, CR_INVALID_CLIENT_FLAG, SQLSTATE_UNKNOWN,
|
||||
ER(CR_INVALID_CLIENT_FLAG),
|
||||
client_flag, CLIENT_ALLOWED_FLAGS);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!mysql->methods)
|
||||
mysql->methods= &MARIADB_DEFAULT_METHODS;
|
||||
|
||||
|
Reference in New Issue
Block a user