-
Notifications
You must be signed in to change notification settings - Fork 109
Conversation
sql/expression/function/sleep.go
Outdated
} | ||
|
||
if child.(int32) > 0 { | ||
time.Sleep(time.Duration(child.(int32)) * time.Second) |
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.
Based on mysql docs a fraction can be used, so my understanding is that someone can write sleep(0.5)
to sleep for 500 ms. So, I think it's better to make it a float function.
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.
True! I'll fix it in the next push.
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.
Fixed and pushed, PTAL when you can.
or rebuild:
|
@juanjux why is there a "foo" commit in the history? Leftover? :P |
@erizocosmico 🤦♂️ yes, I call foo the commits I do with the intention of rebasing so I don't forget to do it. Clearly it didn't work this time. |
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.
@juanjux could you add the new Function to README and SUPPORTED md files?
@ajnavarro done! |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
PR rebased to the new ` |
@juanjux Check PR content, should we remove base64 Functions from this PR? |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech> Add also test in engine_test.go Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech> Remove base64 stuff Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
@ajnavarro done. |
Adds MySQL SLEEP function, that seems to be useful for some kinds of testing.
Fixes #647.
Signed-off-by: Juanjo Alvarez juanjo@sourced.tech