summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2001-01-02 14:29:47 +0200
committermonty@donna.mysql.com <>2001-01-02 14:29:47 +0200
commite9c2f7d4393075d16da0ae18a9576bebcb1e0dda (patch)
tree06f19c5186e8abb542c18b22202664c033b53f4f /client/mysqlimport.c
parent476d960b4246884f74a22fec0d8cd2ff0f280960 (diff)
downloadmariadb-git-e9c2f7d4393075d16da0ae18a9576bebcb1e0dda.tar.gz
Fixes to get mysql-test included in the distributions
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 4ca6edf21f2..3672edd62e5 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -452,18 +452,21 @@ static void db_error(MYSQL *mysql)
}
-static char *add_load_option(char *ptr,const char *object,const char *statement)
+static char *add_load_option(char *ptr, const char *object,
+ const char *statement)
{
if (object)
{
- 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++= '\'';
- }
+ /* Don't escape hex constants */
+ if (object[0] == '0' && (object[1] == 'x' || object[1] == 'X'))
+ 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;
}