mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
dyn0dyn.ic, dyn0dyn.h:
Fix the crash on AIX in a simple insert innobase/include/dyn0dyn.h: Fix the crash on AIX in a simple insert innobase/include/dyn0dyn.ic: Fix the crash on AIX in a simple insert
This commit is contained in:
@ -17,13 +17,8 @@ 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 */
|
||||
#ifndef _AIX
|
||||
#define DYN_ARRAY_DATA_SIZE 1024
|
||||
#else
|
||||
/* AIX has a quite small stack / thread */
|
||||
#define DYN_ARRAY_DATA_SIZE 128
|
||||
#endif
|
||||
/* This must be > MLOG_BUF_MARGIN + 30 */
|
||||
#define DYN_ARRAY_DATA_SIZE 512
|
||||
|
||||
/*************************************************************************
|
||||
Initializes a dynamic array. */
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user