Skip to content
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

some optimizations may cause some wrong result for extension functions. #51925

Closed
lcwangchao opened this issue Mar 20, 2024 · 0 comments · Fixed by #51926
Closed

some optimizations may cause some wrong result for extension functions. #51925

lcwangchao opened this issue Mar 20, 2024 · 0 comments · Fixed by #51926

Comments

@lcwangchao
Copy link
Collaborator

lcwangchao commented Mar 20, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

We found serval problems when a extension function is optimized by planner:

  • extension function fold by mistake even if it has some side effect.
  • extension function result may be cached in some expression such as regexp
  • extension function maybe cached in plan cache that will cause privilege check pass even if some privileges are revoked.

You can see the test: https://github.com/pingcap/tidb/pull/51926/files#diff-b06ca4f8065e5716bc7b3e5d5cfe389156ad9125bddb40ff1d95a59d889d45c8R461 for detail

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@lcwangchao lcwangchao added type/bug This issue is a bug. severity/major labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant