1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

merge with 4.0 to get security fixes and latest bug fixes

BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
BitKeeper/deleted/.del-mini_client.cc~8677895ec8169183:
  Auto merged
VC++Files/mysql.dsw:
  Auto merged
VC++Files/mysys/mysys.dsp:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
innobase/include/srv0start.h:
  Auto merged
innobase/lock/lock0lock.c:
  Auto merged
innobase/mem/mem0dbg.c:
  Auto merged
innobase/que/que0que.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
innobase/sync/sync0rw.c:
  Auto merged
innobase/sync/sync0sync.c:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
libmysql/manager.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/unireg.cc:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Removed wrong define USE_SYMLINK
include/config-win.h:
  Use original code
innobase/srv/srv0srv.c:
  merge
innobase/usr/usr0sess.c:
  merge
libmysql/libmysql.c:
  merge
mysql-test/r/func_test.result:
  merge
mysql-test/t/func_test.test:
  merge
sql/log.cc:
  merge
sql/mysqld.cc:
  merge
This commit is contained in:
unknown
2004-02-20 17:43:02 +02:00
112 changed files with 2328 additions and 49895 deletions

View File

@ -447,9 +447,9 @@ io_handler_thread(
}
#ifdef __WIN__
#define SRV_PATH_SEPARATOR "\\"
#define SRV_PATH_SEPARATOR '\\'
#else
#define SRV_PATH_SEPARATOR "/"
#define SRV_PATH_SEPARATOR '/'
#endif
/*************************************************************************
@ -477,31 +477,26 @@ srv_normalize_path_for_win(
Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */
static
char*
srv_add_path_separator_if_needed(
/*=============================*/
/* out, own: string which has the separator if the
/* out: string which has the separator if the
string is not empty */
char* str) /* in: null-terminated character string */
{
char* out_str;
ulint len = ut_strlen(str);
if (ut_strlen(str) == 0) {
if (len == 0 || str[len - 1] == SRV_PATH_SEPARATOR) {
return(str);
}
if (str[ut_strlen(str) - 1] == SRV_PATH_SEPARATOR[0]) {
out_str = ut_malloc(ut_strlen(str) + 1);
sprintf(out_str, "%s", str);
return(out_str);
}
out_str = ut_malloc(ut_strlen(str) + 2);
sprintf(out_str, "%s%s", str, SRV_PATH_SEPARATOR);
out_str = ut_malloc(len + 2);
memcpy(out_str, str, len);
out_str[len] = SRV_PATH_SEPARATOR;
out_str[len + 1] = 0;
return(out_str);
}