Join GitHub today
coprocessor: allow invalid dates SQL mode #4100
Context: in TiDB we added the SQL mode ALLOW_INVALID_DATES: pingcap/tidb#8263
This is tested to work for INSERT and I think select works for mocktikv. However, in my testing it does not work with the TiKV co-processor.
What did you do?
From a TiDB MySQL client:
What did you expect to see?
What did you see instead?
The above error
I am told the docs for the coprocessor are here: https://pingcap.com/blog/adding-built-in-functions-to-tikv/
I looked into this in more detail with help from @brson. @brson also mentioned that there were some existing plans to alter the
After constructing a valid time, mod.rs returns a custom
The sql modes are taken in as a bit-shifted field and we would need to add a bitshift for invalid dates in
Although there are unknowns, getting started on this looks pretty straightforward: