-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow charset introducers with vindex column values #6236
Milestone
Comments
The PR works for SELECT / INSERT; but fails on at least some UPDATE statements, viz:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Description
Currently, Vindex column values do not support charset introducers (or any expression for that matter).
This can be problematic if you have a BLOB column set as the
from
field of a lookup index and as a column in a lookup table for this vindex.For example, attempting to:
INSERT INTO `Testing.GetByBytesEntity` (`bytes`) VALUES (@1); SELECT `id`, `bytes` FROM `Testing.GetByBytesEntity` WHERE `id`=last_insert_id();
Returns the following error:
vtgate: could not compute value for vindex or auto-inc column: expression is too complex '_binary :vtg19'
In this case, because parameter 1 is of type
[]byte
, the go-sql-driver prepends the value with the_binary
charset introducer. Attempts to work around this by sending the binary as a string-encoded equivalent (https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html) were unsuccessful.CC @harshit-gangal
The text was updated successfully, but these errors were encountered: