From 2c4fa340cccbf11dc7b7f944cf7ca30af48edf4f Mon Sep 17 00:00:00 2001 From: "monty@mashka.mysql.fi" <> Date: Thu, 8 Aug 2002 03:12:02 +0300 Subject: Lots of code fixes to the replication code (especially the binary logging and index log file handling) Fixed bugs in my last changeset that made MySQL hard to compile. Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables. Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions Extended my_chsize() to allow one to specify a filler character. Extend vio_blocking to return the old state (This made some usage of this function much simpler) Added testing for some functions that they caller have got the required mutexes before calling the function. Use setrlimit() to ensure that we can write core file if one specifies --core-file. Added --slave-compressed-protocol Made 2 the minimum length for ft_min_word_len Added variables foreign_key_checks & unique_checks. Less logging from replication code (if not started with --log-warnings) Changed that SHOW INNODB STATUS requre the SUPER privilege More DBUG statements and a lot of new code comments --- innobase/include/dyn0dyn.h | 9 ++------- innobase/include/dyn0dyn.ic | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'innobase/include') diff --git a/innobase/include/dyn0dyn.h b/innobase/include/dyn0dyn.h index 332622b6d4c..6f08da1533b 100644 --- a/innobase/include/dyn0dyn.h +++ b/innobase/include/dyn0dyn.h @@ -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. */ 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); } } -- cgit v1.2.1