-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Com_delete
, Com_insert
, Com_update
status variables
#2427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
sql/core.go
Outdated
// TODO: goroutine for speed | ||
if _, globalComDelete, ok := StatusVariables.GetGlobal(name); ok { | ||
if v, isUint64 := globalComDelete.(uint64); isUint64 { | ||
StatusVariables.SetGlobal(name, v+1) | ||
} | ||
} | ||
if sessComDelete, err := ctx.GetStatusVariable(ctx, name); err == nil { | ||
if v, isUint64 := sessComDelete.(uint64); isUint64 { | ||
ctx.SetStatusVariable(ctx, name, v+1) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just go ahead and add it while we're in here? The tests may be racey then and need a little pause before checking var values. We could hold off and do a quick perf profile and see how big the difference is, but since this code needs to lock two mutexes, it's probably going to be worth it, especially in an environment with multiple clients and contention on the locks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding goroutines here:
#2430
related: dolthub/dolt#7646