summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-03 16:50:06 +0200
committerunknown <monty@mysql.com>2005-02-03 16:50:06 +0200
commitc41989a28e674829614068d0558bda2d220bdde2 (patch)
tree263c4802be24a98c40a87086c8641ff4c4cbfd78 /innobase
parent888c211805fdc501e078c7f8576821b121eb6637 (diff)
parent4f1cbb6031d8310f17db9e503234ef169805412a (diff)
downloadmariadb-git-c41989a28e674829614068d0558bda2d220bdde2.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0 BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged scripts/mysql_install_db.sh: Auto merged sql/examples/ha_archive.cc: Auto merged sql/ha_innodb.cc: Auto merged
Diffstat (limited to 'innobase')
-rw-r--r--innobase/buf/buf0rea.c4
-rw-r--r--innobase/fil/fil0fil.c4
-rw-r--r--innobase/include/univ.i4
-rw-r--r--innobase/os/os0file.c23
-rw-r--r--innobase/ut/ut0ut.c12
5 files changed, 23 insertions, 24 deletions
diff --git a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c
index 1ce52c8ee31..d9dc2ca93f5 100644
--- a/innobase/buf/buf0rea.c
+++ b/innobase/buf/buf0rea.c
@@ -686,7 +686,9 @@ buf_read_recv_pages(
fprintf(stderr,
"InnoDB: Error: InnoDB has waited for 50 seconds for pending\n"
"InnoDB: reads to the buffer pool to be finished.\n"
-"InnoDB: Number of pending reads %lu\n", (ulong) buf_pool->n_pend_reads);
+"InnoDB: Number of pending reads %lu, pending pread calls %lu\n",
+ (ulong) buf_pool->n_pend_reads,
+ (ulong)os_file_n_pending_preads);
os_aio_print_debug = TRUE;
}
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 9b2f7ffe575..8da6ad08538 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -3013,8 +3013,8 @@ fil_load_single_table_tablespaces(void)
/* printf(
" Looking at file %s\n", fileinfo.name); */
- if (fileinfo.type == OS_FILE_TYPE_DIR
- || dbinfo.type == OS_FILE_TYPE_UNKNOWN) {
+ if (fileinfo.type == OS_FILE_TYPE_DIR) {
+
goto next_file_item;
}
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index 5d1e8e208cd..8158c198e21 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -80,10 +80,6 @@ memory is read outside the allocated blocks. */
/* Make a non-inline debug version */
-#ifdef DBUG_ON
-#define UNIV_DEBUG
-#endif /* DBUG_ON */
-
/*
#define UNIV_DEBUG
#define UNIV_MEM_DEBUG
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index a2c5365993c..969f7aee859 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -711,12 +711,12 @@ http://www.mysql.com/doc/en/Windows_symbolic_links.html */
} else if (lpFindFileData->dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY) {
info->type = OS_FILE_TYPE_DIR;
- } else if (lpFindFileData->dwFileAttributes
- & FILE_ATTRIBUTE_NORMAL) {
-/* TODO: are FILE_ATTRIBUTE_NORMAL files really all normal files? */
- info->type = OS_FILE_TYPE_FILE;
} else {
- info->type = OS_FILE_TYPE_UNKNOWN;
+ /* It is probably safest to assume that all other
+ file types are normal. Better to check them rather
+ than blindly skip them. */
+
+ info->type = OS_FILE_TYPE_FILE;
}
}
@@ -834,7 +834,7 @@ os_file_create_directory(
rcode = CreateDirectory(pathname, NULL);
if (!(rcode != 0 ||
- (GetLastError() == ERROR_FILE_EXISTS && !fail_if_exists))) {
+ (GetLastError() == ERROR_ALREADY_EXISTS && !fail_if_exists))) {
/* failure */
os_file_handle_error(pathname, "CreateDirectory");
@@ -918,8 +918,9 @@ try_again:
file = CreateFile(name,
access,
- FILE_SHARE_READ,/* file can be read also by other
- processes */
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ /* file can be read ansd written also
+ by other processes */
NULL, /* default security attributes */
create_flag,
attributes,
@@ -1024,7 +1025,7 @@ os_file_create_simple_no_error_handling(
DWORD create_flag;
DWORD access;
DWORD attributes = 0;
- DWORD share_mode = FILE_SHARE_READ;
+ DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
ut_a(name);
@@ -1347,7 +1348,7 @@ loop:
return(TRUE);
}
- if (GetLastError() == ERROR_PATH_NOT_FOUND) {
+ if (GetLastError() == ERROR_FILE_NOT_FOUND) {
/* the file does not exist, this not an error */
return(TRUE);
@@ -1408,7 +1409,7 @@ loop:
return(TRUE);
}
- if (GetLastError() == ERROR_PATH_NOT_FOUND) {
+ if (GetLastError() == ERROR_FILE_NOT_FOUND) {
/* If the file does not exist, we classify this as a 'mild'
error and return */
diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c
index 6f2aa0957d8..ee94c756959 100644
--- a/innobase/ut/ut0ut.c
+++ b/innobase/ut/ut0ut.c
@@ -44,13 +44,13 @@ ut_get_high32(
/* out: a >> 32 */
ulint a) /* in: ulint */
{
-#if SIZEOF_LONG == 4
- UT_NOT_USED(a);
+ ib_longlong i;
- return 0;
-#else
- return(a >> 32);
-#endif
+ i = (ib_longlong)a;
+
+ i = i >> 32;
+
+ return((ulint)i);
}
/************************************************************