summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-12-20 13:13:55 +0200
committerunknown <heikki@hundin.mysql.fi>2003-12-20 13:13:55 +0200
commit9e56a0a7711e1f6f2b234db54b3e3d2004069bbf (patch)
treedb2c563a0823450c1879c1ff956891b9a71ba6a5 /innobase
parentd5708aeb6873611d0b86e27b2540bb9535e40e21 (diff)
downloadmariadb-git-9e56a0a7711e1f6f2b234db54b3e3d2004069bbf.tar.gz
srv0start.c, univ.i, configure.in:
Check at compilation time on Unix that InnoDB ulint is the same size as void*, and also check it at runtime innobase/configure.in: Check at compilation time on Unix that InnoDB ulint is the same size as void*, and also check it at runtime innobase/include/univ.i: Check at compilation time on Unix that InnoDB ulint is the same size as void*, and also check it at runtime innobase/srv/srv0start.c: Check at compilation time on Unix that InnoDB ulint is the same size as void*, and also check it at runtime
Diffstat (limited to 'innobase')
-rw-r--r--innobase/configure.in1
-rw-r--r--innobase/include/univ.i6
-rw-r--r--innobase/srv/srv0start.c9
3 files changed, 15 insertions, 1 deletions
diff --git a/innobase/configure.in b/innobase/configure.in
index 29309a2c0a5..9d57a0f2d91 100644
--- a/innobase/configure.in
+++ b/innobase/configure.in
@@ -37,6 +37,7 @@ AC_PROG_INSTALL
AC_CHECK_HEADERS(aio.h sched.h)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(void*, 4)
AC_CHECK_FUNCS(sched_yield)
AC_CHECK_FUNCS(fdatasync)
#AC_CHECK_FUNCS(localtime_r) # Already checked by MySQL
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index 346b3b3d09f..2b0f85884b9 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -204,6 +204,12 @@ typedef __int64 ib_longlong;
typedef longlong ib_longlong;
#endif
+#ifndef __WIN__
+#if SIZEOF_LONG != SIZEOF_VOIDP
+#error "Error: InnoDB's ulint must be of the same size as void*"
+#endif
+#endif
+
/* The following type should be at least a 64-bit floating point number */
typedef double utfloat;
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index a2d4d2ba9b8..5fe66f515bc 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -57,7 +57,6 @@ Created 2/16/1996 Heikki Tuuri
#include "srv0start.h"
#include "que0que.h"
-
/* Log sequence number immediately after startup */
dulint srv_start_lsn;
/* Log sequence number at shutdown */
@@ -1010,6 +1009,14 @@ innobase_start_or_create_for_mysql(void)
ibool srv_file_per_table_original_value = srv_file_per_table;
mtr_t mtr;
+ if (sizeof(ulint) != sizeof(void*)) {
+ fprintf(stderr,
+"InnoDB: Error: size of InnoDB's ulint is %lu, but size of void* is %lu.\n"
+"InnoDB: The sizes should be the same so that on a 64-bit platform you can\n"
+"InnoDB: allocate more than 4 GB of memory.",
+ (ulong)sizeof(ulint), (ulong)sizeof(void*));
+ }
+
srv_file_per_table = FALSE; /* system tables are created in tablespace
0 */
#ifdef UNIV_DEBUG