summaryrefslogtreecommitdiff
path: root/innobase/fil
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2004-04-26 15:53:31 +0300
committerunknown <monty@mishka.local>2004-04-26 15:53:31 +0300
commit1065f2bbd66ac4b1161f5c188171a54cbad5b422 (patch)
tree25e3315af05fa92d20d2ad1d812882957c400337 /innobase/fil
parent0ba6cb48d84f1ff951d09871a96be6cdef3f2c3c (diff)
parent6366a9090c7fc24f0e13b5b9d73d6777dcda9d9e (diff)
downloadmariadb-git-1065f2bbd66ac4b1161f5c188171a54cbad5b422.tar.gz
Merge with 4.0
innobase/dict/dict0boot.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/dict/dict0mem.c: Auto merged innobase/fut/fut0lst.c: Auto merged innobase/include/buf0lru.h: Auto merged innobase/include/dict0mem.h: Auto merged innobase/include/fsp0fsp.h: Auto merged innobase/include/ha0ha.h: Auto merged innobase/include/ibuf0ibuf.h: Auto merged innobase/include/lock0lock.h: Auto merged innobase/include/log0log.h: Auto merged innobase/include/mem0pool.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0file.h: Auto merged innobase/include/rem0rec.h: Auto merged innobase/include/rem0rec.ic: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/include/trx0sys.h: Auto merged innobase/include/ut0byte.h: Auto merged innobase/include/ut0ut.h: Auto merged innobase/mem/mem0pool.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0proc.c: Auto merged innobase/pars/lexyy.c: Auto merged innobase/pars/pars0opt.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0purge.c: Auto merged innobase/row/row0uins.c: Auto merged innobase/row/row0umod.c: Auto merged innobase/row/row0undo.c: Auto merged innobase/row/row0upd.c: Auto merged innobase/trx/trx0purge.c: Auto merged innobase/trx/trx0roll.c: Auto merged innobase/trx/trx0sys.c: Auto merged innobase/trx/trx0undo.c: Auto merged innobase/ut/ut0byte.c: Auto merged pstack/bucomm.h: Auto merged pstack/budbg.h: Auto merged sql/item_sum.h: Auto merged sql/slave.cc: Auto merged sql/sql_db.cc: Auto merged support-files/mysql.spec.sh: Auto merged tests/insert_test.c: Auto merged mysql-test/t/func_group.test: Merge with 4.0 Put 4.1 tests lasts sql/ha_innodb.cc: Merge with 4.0 Added checking of results from my_malloc() BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase/fil')
-rw-r--r--innobase/fil/fil0fil.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 768dda4eedc..b3cf1457225 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -86,7 +86,7 @@ the count drops to zero. */
/* When mysqld is run, the default directory "." is the mysqld datadir,
but in the MySQL Embedded Server Library and ibbackup it is not the default
directory, and we must set the base file path explicitly */
-char* fil_path_to_mysql_datadir = (char*)".";
+const char* fil_path_to_mysql_datadir = (char*)".";
ulint fil_n_pending_log_flushes = 0;
ulint fil_n_pending_tablespace_flushes = 0;
@@ -399,7 +399,6 @@ fil_node_create(
fil_system_t* system = fil_system;
fil_node_t* node;
fil_space_t* space;
- char* name2;
ut_a(system);
ut_a(name);
@@ -408,11 +407,7 @@ fil_node_create(
node = mem_alloc(sizeof(fil_node_t));
- name2 = mem_alloc(ut_strlen(name) + 1);
-
- ut_strcpy(name2, name);
-
- node->name = name2;
+ node->name = mem_strdup(name);
node->open = FALSE;
ut_a(!is_raw || srv_start_raw_disk_in_use);
@@ -433,7 +428,7 @@ fil_node_create(
fprintf(stderr,
" InnoDB: Error: Could not find tablespace %lu for\n"
"InnoDB: file %s from the tablespace memory cache.\n", (ulong) id, name);
- mem_free(name2);
+ mem_free(node->name);
mem_free(node);
@@ -816,7 +811,6 @@ fil_space_create(
{
fil_system_t* system = fil_system;
fil_space_t* space;
- char* name2;
ulint namesake_id;
try_again:
/*printf(
@@ -881,11 +875,7 @@ try_again:
space = mem_alloc(sizeof(fil_space_t));
- name2 = mem_alloc(ut_strlen(name) + 1);
-
- ut_strcpy(name2, name);
-
- space->name = name2;
+ space->name = mem_strdup(name);
space->id = id;
system->tablespace_version++;
@@ -3726,7 +3716,7 @@ fil_aio_wait(
ut_ad(fil_validate());
if (os_aio_use_native_aio) {
- srv_io_thread_op_info[segment] = (char *) "handle native aio";
+ srv_set_io_thread_op_info(segment, "native aio handle");
#ifdef WIN_ASYNC_IO
ret = os_aio_windows_handle(segment, 0, (void**) &fil_node,
&message, &type);
@@ -3737,7 +3727,7 @@ fil_aio_wait(
ut_error;
#endif
} else {
- srv_io_thread_op_info[segment] =(char *)"handle simulated aio";
+ srv_set_io_thread_op_info(segment, "simulated aio handle");
ret = os_aio_simulated_handle(segment, (void**) &fil_node,
&message, &type);
@@ -3745,7 +3735,7 @@ fil_aio_wait(
ut_a(ret);
- srv_io_thread_op_info[segment] = (char *) "complete io for fil node";
+ srv_set_io_thread_op_info(segment, "complete io for fil node");
mutex_enter(&(system->mutex));
@@ -3762,11 +3752,10 @@ fil_aio_wait(
open, and use a special i/o thread to serve insert buffer requests. */
if (buf_pool_is_block(message)) {
- srv_io_thread_op_info[segment] =
- (char *) "complete io for buf page";
+ srv_set_io_thread_op_info(segment, "complete io for buf page");
buf_page_io_complete(message);
} else {
- srv_io_thread_op_info[segment] =(char *) "complete io for log";
+ srv_set_io_thread_op_info(segment, "complete io for log");
log_io_complete(message);
}
}
@@ -3847,7 +3836,9 @@ retry:
mutex_exit(&(system->mutex));
- /* printf("Flushing to file %s\n", node->name); */
+ /* fprintf(stderr, "Flushing to file %s\n",
+ node->name); */
+
os_file_flush(file);
mutex_enter(&(system->mutex));