mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Use mysql_optionsv to tell newer MySQL servers HeidiSQL's program_name, visible then in performance_schema.session_connect_attrs
This commit is contained in:
@@ -1787,6 +1787,10 @@ begin
|
||||
if Parameters.CleartextPluginEnabled then
|
||||
FLib.mysql_options(FHandle, Integer(MYSQL_ENABLE_CLEARTEXT_PLUGIN), PAnsiChar('1'));
|
||||
|
||||
// Tell server who we are
|
||||
if Assigned(FLib.mysql_optionsv) then
|
||||
FLib.mysql_optionsv(FHandle, Integer(MYSQL_OPT_CONNECT_ATTR_ADD), 'program_name', APPNAME);
|
||||
|
||||
Connected := FLib.mysql_real_connect(
|
||||
FHandle,
|
||||
PAnsiChar(Utf8Encode(FinalHost)),
|
||||
|
||||
@@ -341,6 +341,7 @@ type
|
||||
mysql_num_fields: function(Result: PMYSQL_RES): Integer; stdcall;
|
||||
mysql_num_rows: function(Result: PMYSQL_RES): Int64; stdcall;
|
||||
mysql_options: function(Handle: PMYSQL; Option: Integer; arg: PAnsiChar): Integer; stdcall;
|
||||
mysql_optionsv: function(Handle: PMYSQL; Option: Integer; arg, val: PAnsiChar): Integer; stdcall;
|
||||
mysql_ping: function(Handle: PMYSQL): Integer; stdcall;
|
||||
mysql_real_connect: function(Handle: PMYSQL; const Host, User, Passwd, Db: PAnsiChar; Port: Cardinal; const UnixSocket: PAnsiChar; ClientFlag: Cardinal): PMYSQL; stdcall;
|
||||
mysql_real_query: function(Handle: PMYSQL; const Query: PAnsiChar; Length: Cardinal): Integer; stdcall;
|
||||
@@ -7675,6 +7676,7 @@ begin
|
||||
AssignProc(@mysql_num_rows, 'mysql_num_rows');
|
||||
AssignProc(@mysql_ping, 'mysql_ping');
|
||||
AssignProc(@mysql_options, 'mysql_options');
|
||||
AssignProc(@mysql_optionsv, 'mysql_optionsv', False);
|
||||
AssignProc(@mysql_real_connect, 'mysql_real_connect');
|
||||
AssignProc(@mysql_real_query, 'mysql_real_query');
|
||||
AssignProc(@mysql_ssl_set, 'mysql_ssl_set');
|
||||
|
||||
Reference in New Issue
Block a user