-
-
Notifications
You must be signed in to change notification settings - Fork 213
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 event execution #1786
support event execution #1786
Conversation
…he system time zone only
|
||
// GetTimeValueFromStringInput returns time.Time in system timezone (SYSTEM = time.Now().Location()). | ||
// evaluating valid MySQL datetime and timestamp formats. | ||
func GetTimeValueFromStringInput(field, t string) (time.Time, error) { |
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.
Is there existing code we could use to parse a string timestamp or does this have unique behavior? Could we use Datetime.Convert(string)
instead? If not, would be good to document why this code needs to be different; it seems like the datetime parsing should be the same across MySQL.
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.
If I remember correctly, I added this method because our current method of parsing datetime or timestamp type values does not match MySQL. It is mentioned as TODO /~https://github.com/dolthub/go-mysql-server/blob/main/sql/types/datetime.go#L232
The reason I wrote incomplete (the timestamp string parsing is missing) parsing method that is different from our current one here is that event queries use datetime value very commonly and that it needs to parse some formats that our current Datetime.Convert(string)
method is not able to parse. This caused many event query cases to fail.
… modified out of band (i.e. without going through CREATE EVENT, ALTER EVENT, DROP EVENT).
…g into GMS layer and getting rid of ReloadEvents function in the EventDatabase interface.
…ide the default loop period (30s)
This PR adds event execution logic implementing EventScheduler interface in the engine.
Notes:
DISABLE ON SLAVE
status is not supported. It will be set toDISABLE
by default.Corresponding Dolt changes: dolthub/dolt#6108