-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
json_extract fails with non-quoted path #38230
Comments
I tested on a second cluster that has the exact same I don't know what else it could be, though? |
the issue appears to have stopped in the original database where it was happening. I think that maybe there was a failed query that somehow got cached, and when the cache cleared, a fresh query worked as expected. does that sound plausible? |
yes, there is a cache about json path, it looks like some unknown source value has overwritten the cached value. can you please provide more information about how you use the |
the example that I posted (step 1) was a simple creation of a table, then I inserted JSON as a string. there were no other operations. it failed on the very first in other databases (in the same cluster), I use all sorts of operations on the JSON field. I don't think I can narrow it down - it's used in a lot of places in a lot of different ways. But I think it's interesting that it failed on a simple table creation. If there is a cache on the json path - is that cache cross-database? It's interesting that it would fail in two separate databases within the same cluster. that might be the clue you need. |
yes, the cache will cross-database. I believe the root cause is the cached data is broken, actually, I have checked all the possibilities that could break the data but still find nothing. I will write some code to simulate the scenario to see if I can find something. |
is there a way to clear the cache, in case this happens again? |
the only way now is restart the server |
close due to we have a fix, feel free to open it if it happens again |
Bug Report
this has happened since upgrading from v6.1.1 to v6.2.0. when I select a JSON field on a valid path that does not need quotes, it fails.
it fails with both
json_extract()
and with the->
shortcut as well1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: