parser
parser copied to clipboard
Add builtin function prototype `get_mvcc_info` in parser
Feature Request
This is sub issue of https://github.com/pingcap/tidb/issues/15938
Is your feature request related to a problem? Please describe:
To implement getting mvcc info through SQL, TiDB need to support 4 builtin function.
get_mvcc_info
is one of them.
Describe the feature you'd like:
add get_mvcc_info
into parser.
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
- Add function name in to
functions.go
- Add test case.

Can we only add one builtin function like get_mvcc_info(method string, param... string)
to handle all these scenarios?
The only valid methods are "hex"/"rowid"/"snapshot"/"index". For different methods, we can specify different numbers of parameters.
@zz-jason yes, it will be much clean. so we could close other three issue, and keep one issue for UCP contributor.
@zz-jason @imtbkcat If we using the single method get_mvcc_info
, it means the parameters passed in have to be in order and have different meanings depends on the first method name? Is it a little bit complicated?
Actually, there are some MySQL builtin functions like this. I think the complication can be accepted.