On Wed, Jan 15, 2003 at 12:46:40PM -0800, Brion Vibber wrote:
On mer, 2003-01-15 at 06:07, Tomasz Wegrzanowski
wrote:
It seems it's MySQL who's not playing
nice. Last byte of hash of such
expression is 20 and MySQL probably thinks that as it's a space it doesn't
have to be transferer to us, and so it transfer only first 15 bytes.
`char(16) NOT NULL' seems to behave that way.
Is there some data type that doesn't behave that way or should we
keep adding spaces to $rpage->math_outputhash until it is 16 bytes long ?
Yeah, that would do it. CHAR columns aren't binary-safe; they're
internally padded with spaces at the end and trailing spaces are
stripped on read. Perhaps VARCHAR(16) BINARY?
It's not variable size - it's always 128 bit.
What is usually used to store MD5s in MySQL ?
Would CHAR(16) BINARY NOT NULL work ?