You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using user defined variables in a session, information is lost when the value is passed down the MySQL when interpolated.
In the reproduction below, it can be seen that the collation for the @pt variable is returned as utf8mb4_0900_ai_ci. What is happening here is that the bind variables are sent down to vttablet and there interpolated, but then the literal string is used without any annotation.
So MySQL ends up running select collation('foo', rand();, which means the collation information is lost. We need to make sure that the variable is escaped as a proper binary string.
Overview of the Issue
When using user defined variables in a session, information is lost when the value is passed down the MySQL when interpolated.
In the reproduction below, it can be seen that the collation for the
@pt
variable is returned asutf8mb4_0900_ai_ci
. What is happening here is that the bind variables are sent down tovttablet
and there interpolated, but then the literal string is used without any annotation.So MySQL ends up running
select collation('foo', rand();
, which means the collation information is lost. We need to make sure that the variable is escaped as a proper binary string.Reproduction Steps
Binary Version
Operating System and Environment details
Log Fragments
The text was updated successfully, but these errors were encountered: