From 48e8ed29ebbd0846e0c32a94be0413902d7d9198 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Jul 2002 18:25:16 +0300 Subject: [PATCH] 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 --- innobase/include/dyn0dyn.h | 2 +- innobase/include/dyn0dyn.ic | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/innobase/include/dyn0dyn.h b/innobase/include/dyn0dyn.h index 0952a8b4647..6f08da1533b 100644 --- a/innobase/include/dyn0dyn.h +++ b/innobase/include/dyn0dyn.h @@ -17,7 +17,7 @@ typedef struct dyn_block_struct dyn_block_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 /************************************************************************* diff --git a/innobase/include/dyn0dyn.ic b/innobase/include/dyn0dyn.ic index dc004efbb8b..787615cae09 100644 --- a/innobase/include/dyn0dyn.ic +++ b/innobase/include/dyn0dyn.ic @@ -185,7 +185,8 @@ dyn_array_open( /*===========*/ /* out: pointer to the buffer */ 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; ulint used; @@ -207,6 +208,7 @@ dyn_array_open( if (used + size > DYN_ARRAY_DATA_SIZE) { block = dyn_array_add_block(arr); used = block->used; + ut_a(size <= DYN_ARRAY_DATA_SIZE); } }