diff options
author | unknown <monty@mashka.mysql.fi> | 2003-01-03 00:04:33 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-01-03 00:04:33 +0200 |
commit | eebc67f6f8df9e0bdcde7770e383992ff6cad451 (patch) | |
tree | 461fafebcf70ffd880e85f8342601eaade292e1b /mysys | |
parent | 5265a1656ea58d9534ebadfbd45c662080f89bb0 (diff) | |
parent | 62b38d20ddcf4fb0f519e8b647916d7b367e894c (diff) | |
download | mariadb-git-eebc67f6f8df9e0bdcde7770e383992ff6cad451.tar.gz |
Merge with 4.0.8
BitKeeper/etc/logging_ok:
auto-union
VC++Files/sql/mysqld.dsp:
Auto merged
acinclude.m4:
Auto merged
include/my_base.h:
Auto merged
include/myisam.h:
Auto merged
include/myisammrg.h:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_write.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/case.result:
Auto merged
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/key_diff.result:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/rpl_log_pos.test:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_myisammrg.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql-bench/crash-me.sh:
Auto merged
sql-bench/server-cfg.sh:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/structs.h:
Auto merged
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/Makefile.am | 1 | ||||
-rw-r--r-- | mysys/my_alloc.c | 4 | ||||
-rw-r--r-- | mysys/my_rename.c | 7 |
3 files changed, 10 insertions, 2 deletions
diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 330e1d6e59d..b6f00daa5cc 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -65,7 +65,6 @@ EXTRA_PROGRAMS = DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \ - -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ @DEFS@ diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 1ab86476e41..4d3b0604984 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -25,12 +25,13 @@ void init_alloc_root(MEM_ROOT *mem_root, uint block_size, uint pre_alloc_size __attribute__((unused))) { - mem_root->free= mem_root->used= 0; + mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= block_size-MALLOC_OVERHEAD-sizeof(USED_MEM)-8; mem_root->error_handler= 0; mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; + #if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { @@ -137,6 +138,7 @@ static inline void mark_blocks_free(MEM_ROOT* root) /* Now everything is set; Indicate that nothing is used anymore */ root->used= 0; + root->first_block_usage= 0; } diff --git a/mysys/my_rename.c b/mysys/my_rename.c index fde45eba456..d4f99e83247 100644 --- a/mysys/my_rename.c +++ b/mysys/my_rename.c @@ -45,6 +45,13 @@ int my_rename(const char *from, const char *to, myf MyFlags) } #endif #if defined(HAVE_RENAME) +#ifdef __WIN__ + /* + On windows we can't rename over an existing file: + Remove any conflicting files: + */ + (void) my_delete(to, MYF(0)); +#endif if (rename(from,to)) #else if (link(from, to) || unlink(from)) |