Commit 48e8ed29 authored by unknown's avatar unknown

dyn0dyn.ic, dyn0dyn.h:

  Backport the AIX crash fix changes from 4.0


innobase/include/dyn0dyn.h:
  Backport the AIX crash fix changes from 4.0
innobase/include/dyn0dyn.ic:
  Backport the AIX crash fix changes from 4.0
parent cdddb960
...@@ -17,7 +17,7 @@ typedef struct dyn_block_struct dyn_block_t; ...@@ -17,7 +17,7 @@ typedef struct dyn_block_struct dyn_block_t;
typedef dyn_block_t dyn_array_t; typedef dyn_block_t dyn_array_t;
/* Initial 'payload' size in bytes in a dynamic array block */ /* This must be > MLOG_BUF_MARGIN + 30 */
#define DYN_ARRAY_DATA_SIZE 512 #define DYN_ARRAY_DATA_SIZE 512
/************************************************************************* /*************************************************************************
......
...@@ -185,7 +185,8 @@ dyn_array_open( ...@@ -185,7 +185,8 @@ dyn_array_open(
/*===========*/ /*===========*/
/* out: pointer to the buffer */ /* out: pointer to the buffer */
dyn_array_t* arr, /* in: dynamic array */ dyn_array_t* arr, /* in: dynamic array */
ulint size) /* in: size in bytes of the buffer */ ulint size) /* in: size in bytes of the buffer; MUST be
smaller than DYN_ARRAY_DATA_SIZE! */
{ {
dyn_block_t* block; dyn_block_t* block;
ulint used; ulint used;
...@@ -207,6 +208,7 @@ dyn_array_open( ...@@ -207,6 +208,7 @@ dyn_array_open(
if (used + size > DYN_ARRAY_DATA_SIZE) { if (used + size > DYN_ARRAY_DATA_SIZE) {
block = dyn_array_add_block(arr); block = dyn_array_add_block(arr);
used = block->used; used = block->used;
ut_a(size <= DYN_ARRAY_DATA_SIZE);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment