List:General Discussion« Previous MessageNext Message »
From:Michael Fischer Date:November 8 2006 2:50am
Subject:SUBSTR(...) on BINARY column?
View as plain text  
I suspect, from experimentation, that substr() is not binary safe,
in that if some part of the field contains an all-bits-zero byte,
it will "stop short".

What I wish to do is to pick out byte ranges of arbitrary length,
at an arbitary offset into a BINARY(N) column.

Perhaps LEFT() and RIGHT() might be my friends? I  haven't been
able to set up sufficient experiments yet.

Can anyone confirm, or make further suggestions? 

Michael Fischer                         Happiness is a config option.
michael@stripped                        Recompile and be happy. 
SUBSTR(...) on BINARY column?Michael Fischer8 Nov