mariadb/include/my_alloc.h
unknown bd1c2d65c4 Small improvement to alloc_root
Add support for LIMIT # OFFSET #
Changed lock handling:  Now all locks should be stored in TABLE_LIST instead of passed to functions.
Don't call query_cache_invalidate() twice in some cases
mysql_change_user() now clears states to be equal to close + connect.
Fixed a bug with multi-table-update and multi-table-delete when used with LOCK TABLES
Fixed a bug with replicate-do and UPDATE


BitKeeper/etc/ignore:
  added autom4te.cache/* bdb/dist/autom4te.cache/* innobase/autom4te.cache/*
include/my_alloc.h:
  Small improvement to alloc_root
libmysql/libmysql.c:
  Removed compiler warning
myisam/mi_page.c:
  Better DBUG message
mysql-test/r/multi_update.result:
  Added test with lock tables
mysql-test/r/rpl_replicate_do.result:
  Update results
mysql-test/r/rpl_rotate_logs.result:
  Make test independent of if t1 exists
mysql-test/t/multi_update.test:
  Added test with lock tables
mysql-test/t/rpl_rotate_logs.test:
  Make test independent of if t1 exists
mysys/my_alloc.c:
  Small imprevement to alloc_root
  (Don't free blocks less than ALLOC_MAX_BLOCK_ROOT (4K)
sql/ha_innodb.cc:
  More debug messages
sql/ha_myisam.cc:
  Safety change
sql/lex.h:
  Add support for LIMIT # OFFSET #
sql/lock.cc:
  Added assertion
sql/mysql_priv.h:
  Change of lock handling
sql/mysqld.cc:
  Added function clear_error_messages()
sql/sql_base.cc:
  Change lock handling by open_ltable() and open_and_lock_tables()
sql/sql_class.cc:
  Split THD::THD to two functions
  Move some code from cleanup() to ~THD:THD
  Add THD::change_user()
sql/sql_class.h:
  Prototype changes in class THD
sql/sql_delete.cc:
  Remove locking argument from mysql_delete()
  Locking type is now stored in TABLE_LIST
  Small code change to not call query_cache_invalidate() twice for transactional tables.
sql/sql_insert.cc:
  Remove locking argument from mysql_insert()
  Locking type is now stored in TABLE_LIST
  Small code change to not call query_cache_invalidate() twice for transactional tables.
  Don't use bulk insert if bulk_insert_buff_size is 0
sql/sql_parse.cc:
  Changes to make mysql_change_user() work as close+connect
  Changed command statistics to use statstics_increment to get more speed
  Update code to handle that locks is now stored in TABLE_LIST
sql/sql_update.cc:
  Remove locking argument from mysql_update()
  Locking type is now stored in TABLE_LIST
  Small code change to not call query_cache_invalidate() twice for transactional tables.
sql/sql_yacc.yy:
  Locking type is now stored in TABLE_LIST
  Added support for LIMIT # OFFSET # syntax
  Removed some wrong (never true) checks for SQLCOM_MULTI_UPDATE
mysql-test/t/rpl_replicate_do-slave.opt:
  Changed tables to use t1,t2,...
mysql-test/t/rpl_replicate_do.test:
  Changed tables to use t1,t2,...
2002-11-16 20:19:10 +02:00

52 lines
1.8 KiB
C

/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Data structures for mysys/my_alloc.c (root memory allocator)
*/
#ifndef _my_alloc_h
#define _my_alloc_h
#define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
typedef struct st_used_mem
{ /* struct for once_alloc (block) */
struct st_used_mem *next; /* Next block in use */
unsigned int left; /* memory left in block */
unsigned int size; /* size of block */
} USED_MEM;
typedef struct st_mem_root
{
USED_MEM *free; /* blocks with free memory in it */
USED_MEM *used; /* blocks almost without free memory */
USED_MEM *pre_alloc; /* preallocated block */
/* if block have less memory it will be put in 'used' list */
unsigned int min_malloc;
unsigned int block_size; /* initial block size */
unsigned int block_num; /* allocated blocks counter */
/*
first free block in queue test counter (if it exceed
MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list)
*/
unsigned int first_block_usage;
void (*error_handler)(void);
} MEM_ROOT;
#endif