-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 querying MVCC information through builtin function #51683
Comments
@kennytm What do you think about this design? |
@tangenta LGTM, but I'm not sure if the input to |
BTW should these functions require some privilege check to be invoked EDIT: No it definitely needs privilege check. Consider this scenario: -- as root:
create user alice;
create table test.secrets (id bigint primary key, secret varchar(200) not null);
insert into test.secrets values (1, 'confidential data');
The simplest solution is probably require SUPER privilege for |
Enhancement
MVCC information is useful for debugging data inconsistenct issue. For now, we have HTTP API
mvcc/key/...
to query MVCC. However, it is not always convenient to construct a HTTP query. For example, when there are complex data types in index columns or clustered primary key columns liketimestamp
,datetime
or evenbinary
, query parameters cannot represent these values.Maybe we can provide a builtin function like
tidb_mvcc_info()
achieve this purpose.Note: the priviege should be considered to make sure there are no security issues.
The text was updated successfully, but these errors were encountered: