-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
value out of range - insert 0x... into binary #2968
Comments
Thanks for the bug report. We will dig in Monday. @jcor11599 will dig in. |
Hi @milahu , thanks for filing and using Dolt! We'd love to hear about your use case. Feel free to email me (brianf@dolthub.com) or swing by our Discord. |
Thanks for the deeper debugging. This might actually be a @Hydrocharged problem. I can reproduce on the tip of master as well. |
@milahu Thanks for the bug report! Your trace gave me a good starting off point, so much so that I had an idea of what was going on before digging in myself, so I appreciate that very much! 😄 Regarding the first with the |
thanks : ) no need for base64, that was just my desperate attempt to insert 32 bytes |
i cannot insert *large* binary values, encoded as hex numbers
the sha256 hashes were generated with
32 bytes
also tried to insert base64 string
maximum value for
binary(32)
is0xffffffffffffffff
first out-of-range vaue is
0x10000000000000000
growing the
binary(32)
tobinary(128)
orblob
does not helpso this is a bug in the query parser
workaround
split the 256 bit value across 4 x 64 bit fields =
BIGINT UNSIGNED
type = uint64trace
the error is thrown in this call to
se.Query
dolt/go/cmd/dolt/commands/sql.go
Lines 1032 to 1033 in 71ebab5
leads to
strconv.ParseUint
in go-mysql-server ...?convertInt
is called by→
sqlparser.HexNum
vssqlparser.HexVal
= int vs binaryHexNum is limited by the CPU integer size, in my case 64 bit
sqlparser.HexNum
leads to sqlparser ...?The text was updated successfully, but these errors were encountered: