summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-01-02 14:29:47 +0200
committerunknown <monty@donna.mysql.com>2001-01-02 14:29:47 +0200
commit6cfd66f0f80eaedaf6f22236e49dee919d2f6675 (patch)
tree06f19c5186e8abb542c18b22202664c033b53f4f /client/mysqlimport.c
parent0475637d5fa1ff6ac010f4b315a980d5319903d7 (diff)
downloadmariadb-git-6cfd66f0f80eaedaf6f22236e49dee919d2f6675.tar.gz
Fixes to get mysql-test included in the distributions
client/mysqldump.c: Fixed to not use strncasecmp client/mysqlimport.c: Fixed to not use strncasecmp mysql-test/Makefile.am: Changes needed for RPM mysql-test/mysql-test-run.sh: Changes to work with binary installations scripts/make_binary_distribution.sh: Added missing mysql-test files sql-bench/Makefile.am: Changes needed for RPM sql/mysqld.cc: Portability fix support-files/mysql.spec.sh: Added mysql-test to sql-bench
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;
}