summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-03-16 16:11:01 +0200
committerunknown <monty@mysql.com>2005-03-16 16:11:01 +0200
commit284b8b8b63bec8f2d246f6748ab695baa9aaf746 (patch)
tree91072764c1f84696f62c39d4e54fea6a1c35c516 /sql/sql_show.cc
parentbfe19493c5c8c4f4a9e394091f79a9e569382333 (diff)
downloadmariadb-git-284b8b8b63bec8f2d246f6748ab695baa9aaf746.tar.gz
Cleanup during reviews
Removed some optional arguments Fixed portability problem in federated tests client/sql_string.cc: update from sql/sql_string.cc client/sql_string.h: update from sql/sql_string.h mysql-test/r/federated.result: Fixed error message sql/field.cc: Cleanup during review Remove const in 'const unsigned int' sql/field.h: Remove const in 'const unsigned int' sql/ha_federated.cc: Better error string. Add missing argument to error (before 'errno' was picked up from stack) sql/handler.cc: Removed compiler warning sql/item_func.cc: Cleanup during review sql/item_sum.cc: Cleanup during review sql/lock.cc: Remove optional arguments sql/log_event.cc: Remove optional arguments sql/mysql_priv.h: Remove optional arguments cahnge preapre_create_fields to use pointers instead of references sql/opt_range.cc: Fix arguments so that return value is last sql/sql_base.cc: Remove optional arguments sql/sql_delete.cc: Remove optional arguments sql/sql_error.cc: Remove optional arguments sql/sql_help.cc: Remove optional arguments sql/sql_parse.cc: Remove optional arguments sql/sql_prepare.cc: Remove optional arguments sql/sql_rename.cc: Remove optional arguments sql/sql_select.cc: Remove optional arguments sql/sql_show.cc: Cleanup during review sql/sql_string.cc: Simple optimization sql/sql_table.cc: Remove optional arguments Fixed indentation sql/sql_update.cc: Remove optional arguments sql/sql_yacc.yy: Change references to pointers
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 293c5f5d275..124ce1805db 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -704,14 +704,17 @@ static void append_directory(THD *thd, String *packet, const char *dir_type,
packet->append(dir_type);
packet->append(" DIRECTORY='", 12);
#ifdef __WIN__
- char *winfilename = thd->memdup(filename, length);
- for (uint i=0; i < length; i++)
- if (winfilename[i] == '\\')
- winfilename[i] = '/';
- packet->append(winfilename, length);
-#else
- packet->append(filename, length);
+ /* Convert \ to / to be able to create table on unix */
+ char *winfilename= (char*) thd->memdup(filename, length);
+ char *pos, *end;
+ for (pos= winfilename, end= pos+length ; pos < end ; pos++)
+ {
+ if (*pos == '\\')
+ *pos = '/';
+ }
+ filename= winfilename;
#endif
+ packet->append(filename, length);
packet->append('\'');
}
}