Changes from the innodb-5.1-ss28 snapshot.

Removed include/Makefile.am and the reference to it.
 Deleted db/db0err.h and db directory.
 Check index column sizes in a better way (bug 13315).
 Fixed comments for memory allocation functions and added
 some extra checks. Adapted callers.


BitKeeper/deleted/.del-Makefile.am~ab5c84d46412dc2e:
  Delete: storage/innobase/include/Makefile.am
BitKeeper/deleted/.del-db0err.h~bfeec2efe86ac48b:
  Delete: storage/innobase/db/db0err.h
mysql-test/r/innodb.result:
  Changes from the innodb-5.1-ss28 snapshot.
mysql-test/t/innodb.test:
  Changes from the innodb-5.1-ss28 snapshot.
sql/ha_innodb.cc:
  Changes from the innodb-5.1-ss28 snapshot.
sql/ha_innodb.h:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/Makefile.am:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/configure.in:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/ha/ha0ha.c:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/include/ha0ha.h:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/include/ha0ha.ic:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/include/mem0mem.h:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/include/mem0mem.ic:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/lock/lock0lock.c:
  Changes from the innodb-5.1-ss28 snapshot.
storage/innobase/mem/mem0mem.c:
  Changes from the innodb-5.1-ss28 snapshot.
This commit is contained in:
unknown 2005-12-13 16:49:24 +03:00
commit ad4d877350
15 changed files with 137 additions and 235 deletions

View file

@ -16,8 +16,9 @@ Creates a memory heap block where data can be allocated. */
mem_block_t*
mem_heap_create_block(
/*==================*/
/* out, own: memory heap block,
NULL if did not succeed */
/* out, own: memory heap block, NULL if
did not succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps) */
mem_heap_t* heap, /* in: memory heap or NULL if first block
should be created */
ulint n, /* in: number of bytes needed for user data, or
@ -50,7 +51,8 @@ mem_block_t*
mem_heap_add_block(
/*===============*/
/* out: created block, NULL if did not
succeed */
succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps)*/
mem_heap_t* heap, /* in: memory heap */
ulint n); /* in: number of bytes user needs */
@ -126,7 +128,9 @@ UNIV_INLINE
void*
mem_heap_alloc(
/*===========*/
/* out: allocated storage */
/* out: allocated storage, NULL if did not
succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps) */
mem_heap_t* heap, /* in: memory heap */
ulint n) /* in: number of bytes; if the heap is allowed
to grow into the buffer pool, this must be
@ -370,13 +374,15 @@ mem_heap_free_top(
/*********************************************************************
NOTE: Use the corresponding macros instead of this function. Creates a
memory heap which allocates memory from dynamic space. For debugging
purposes, takes also the file name and line as argument. */
memory heap. For debugging purposes, takes also the file name and line as
argument. */
UNIV_INLINE
mem_heap_t*
mem_heap_create_func(
/*=================*/
/* out, own: memory heap */
/* out, own: memory heap, NULL if
did not succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps)*/
ulint n, /* in: desired start block size,
this means that a single user buffer
of size n will fit in the block,
@ -393,11 +399,9 @@ mem_heap_create_func(
block is not unintentionally erased
(if allocated in the stack), before
the memory heap is explicitly freed. */
ulint type, /* in: MEM_HEAP_DYNAMIC
or MEM_HEAP_BUFFER */
ulint type, /* in: heap type */
const char* file_name, /* in: file name where created */
ulint line /* in: line where created */
)
ulint line) /* in: line where created */
{
mem_block_t* block;
@ -409,8 +413,11 @@ mem_heap_create_func(
init_block, type, file_name, line);
}
ut_ad(block);
if (block == NULL) {
return(NULL);
}
UT_LIST_INIT(block->base);
/* Add the created block itself as the first block in the list */
@ -418,11 +425,6 @@ mem_heap_create_func(
#ifdef UNIV_MEM_DEBUG
if (block == NULL) {
return(block);
}
mem_hash_insert(block, file_name, line);
#endif
@ -484,8 +486,7 @@ UNIV_INLINE
void*
mem_alloc_func(
/*===========*/
/* out, own: free storage, NULL
if did not succeed */
/* out, own: free storage */
ulint n, /* in: desired number of bytes */
const char* file_name, /* in: file name where created */
ulint line /* in: line where created */
@ -496,11 +497,7 @@ mem_alloc_func(
heap = mem_heap_create_func(n, NULL, MEM_HEAP_DYNAMIC, file_name,
line);
if (heap == NULL) {
return(NULL);
}
/* Note that as we created the first block in the heap big enough
for the buffer requested by the caller, the buffer will be in the
first block and thus we can calculate the pointer to the heap from