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:
2090
-
rows:=dbt.mustQuery("SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where ID=CONNECTION_ID()")
2089
+
rows:=dbt.mustQuery("SHOW VARIABLES LIKE 'performance_schema'")
2091
2090
ifrows.Next() {
2091
+
varvar_name, valuestring
2092
+
rows.Scan(&var_name, &value)
2093
+
ifvalue!="ON" {
2094
+
t.Skip("performance_schema is disabled")
2095
+
}
2092
2096
} else {
2093
-
dbt.Error("no data in processlist")
2097
+
t.Skip("no performance_schema variable in mysql")
2094
2098
}
2095
2099
2096
2100
rows, err=dbt.db.Query("select attr_value from performance_schema.session_connect_attrs where processlist_id=CONNECTION_ID() and attr_name='program_name'")
2097
2101
iferr!=nil {
2098
-
fmt.Println(err)
2099
-
dbt.Skip("server probably does not support performance_schema.session_connect_attrs")
2102
+
dbt.Skipf("server probably does not support performance_schema.session_connect_attrs: %s", err)
0 commit comments