@@ -5224,6 +5224,10 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
52245224 verbose_msg (" Connecting to server %s:%d (socket %s) as '%s'"
52255225 " , connection '%s', attempt %d ..." ,
52265226 host, port, sock, user, name, failed_attempts);
5227+
5228+ mysql_options (mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0 );
5229+ mysql_options4 (mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
5230+ " program_name" , " mysqltest" );
52275231 while (!mysql_real_connect (mysql, host,user, pass, db, port, sock,
52285232 CLIENT_MULTI_STATEMENTS | CLIENT_REMEMBER_OPTIONS))
52295233 {
@@ -5325,6 +5329,8 @@ int connect_n_handle_errors(struct st_command *command,
53255329 dynstr_append_mem (ds, " ;\n " , 2 );
53265330 }
53275331
5332+ mysql_options (con, MYSQL_OPT_CONNECT_ATTR_RESET, 0 );
5333+ mysql_options4 (con, MYSQL_OPT_CONNECT_ATTR_ADD, " program_name" , " mysqltest" );
53285334 while (!mysql_real_connect (con, host, user, pass, db, port, sock ? sock: 0 ,
53295335 CLIENT_MULTI_STATEMENTS))
53305336 {
0 commit comments