Re: byte[] to binary(16) throwing IndexOutOfRangeException
Posted by: Firstiar Noorwinanto
Date: November 22, 2016 03:37AM

So... Three weeks and no one know why this is happen?

According to the stack traces, the exception was thrown at MySql.Data.Types.MySqlBinary.EscapeByteArray(Byte[] bytes, Int32 length, MySqlPacket packet). If I not mistaken, this should be escaping byte value of 0 (a.k.a 0x0 a.k.a '\0') and any of \\, \', or \" by adding additional '\' before them. The question is, why do we need these escapes?

If the escapes is the intended behavior, is there any way for me to store an exact 16 bytes of array into mysql's binary(16) or varbinary(16)? I can't use bigint since it's only use 8 bytes max.

Options: ReplyQuote


Subject
Written By
Posted
Re: byte[] to binary(16) throwing IndexOutOfRangeException
November 22, 2016 03:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.