diff options
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r-- | client/mysqlimport.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c index d00c99d4061..f85a1c128e2 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -456,9 +456,14 @@ static char *add_load_option(char *ptr,const char *object,const char *statement) { if (object) { - ptr= strxmov(ptr," ",statement," '",NullS); - ptr= field_escape(ptr,object,(uint) strlen(object)); - *ptr++= '\''; + if (!strncasecmp(object,"0x",2)) /* hex constant; don't escape */ + ptr= strxmov(ptr," ",statement," ",object,NullS); + else /* char constant; escape */ + { + ptr= strxmov(ptr," ",statement," '",NullS); + ptr= field_escape(ptr,object,(uint) strlen(object)); + *ptr++= '\''; + } } return ptr; } |