-
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
SPM: the captured binding has _utf8mb4 encoding #21475
Comments
I think this is expected. the |
I think it's a bug. It should be able to rely on mysql [localhost:8022] {msandbox} (test) > CREATE VIEW v1 AS SELECT 'acdc';
Query OK, 0 rows affected (0.00 sec)
mysql [localhost:8022] {msandbox} (test) > show create view v1;
+------+---------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| View | Create View | character_set_client | collation_connection |
+------+---------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`msandbox`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 'acdc' AS `acdc` | utf8mb4 | utf8mb4_0900_ai_ci |
+------+---------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
1 row in set (0.00 sec) |
This issue is pretty complicated. First of all, an embarrassed fact is that
Second, back to this issue itself, the connection charset is Third, one solution for this issue is to fix the wrong explicit charset / collation specification in BindSQL, i.e, change Fourth, a better / complete solution would be storing the correct charset / collation in bindings, and use them in baseline evolution. That requires more code changes, e.g, All in all, this issue would at least not effect the correctness of SQL bind usage, it is more related with baseline evolution. I am going to mark it as low priority. |
Maybe we can add an option to Restore() to decide to restore the charset and collation or not. |
@eurekaka would you please give an updated summary on this given all the enhancement after this issue was originally opened? |
/assign |
After this PR.The SPM will not be affected by charset.
|
/close |
@Reminiscent: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Please check whether the issue should be labeled with 'affects-x.y' or 'backport-x.y.z', |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. 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: