You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// performance_schema seems to be updated with a delay in some conditions, so first see if we are in list:
2093
-
rows:=dbt.mustQuery("SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where ID=CONNECTION_ID()")
2092
+
rows:=dbt.mustQuery("SHOW VARIABLES LIKE 'performance_schema'")
2094
2093
ifrows.Next() {
2094
+
varvar_name, valuestring
2095
+
rows.Scan(&var_name, &value)
2096
+
ifvalue!="ON" {
2097
+
t.Skip("performance_schema is disabled")
2098
+
}
2095
2099
} else {
2096
-
dbt.Error("no data in processlist")
2100
+
t.Skip("no performance_schema variable in mysql")
2097
2101
}
2098
2102
2099
2103
rows, err=dbt.db.Query("select attr_value from performance_schema.session_connect_attrs where processlist_id=CONNECTION_ID() and attr_name='program_name'")
2100
2104
iferr!=nil {
2101
-
fmt.Println(err)
2102
-
dbt.Skip("server probably does not support performance_schema.session_connect_attrs")
2105
+
dbt.Skipf("server probably does not support performance_schema.session_connect_attrs: %s", err)
0 commit comments