mariadb/sql/opt_ft.cc
unknown 74ea459412 Add new user variables for tuning memory usage:
query_alloc_block_size, query_prealloc_size, range_alloc_block_size,transaction_alloc_block_size and transaction_prealloc_size
Add more checks for "out of memory" detection in range optimization


configure.in:
  Added detection of mallinfo
mysql-test/r/variables.result:
  Test of new variables
mysql-test/t/variables.test:
  Test of new variables
sql/ha_berkeley.cc:
  Use init_sql_alloc instead of init_alloc_root for better OOM detection
sql/log_event.cc:
  Add new user variables for tuning memory usage
sql/mysql_priv.h:
  Add new user variables for tuning memory usage
sql/mysqld.cc:
  Add new user variables for tuning memory usage
sql/opt_ft.cc:
  Add new user variables for tuning memory usage
sql/opt_ft.h:
  Add new user variables for tuning memory usage
sql/opt_range.cc:
  Add new user variables for tuning memory usage
  Add more checks for out of memory conditions
sql/opt_range.h:
  Add new user variables for tuning memory usage
sql/set_var.cc:
  Add new user variables for tuning memory usage
sql/sql_acl.cc:
  Add new user variables for tuning memory usage
sql/sql_class.h:
  Add new user variables for tuning memory usage
sql/sql_delete.cc:
  Add new user variables for tuning memory usage
sql/sql_parse.cc:
  Add new user variables for tuning memory usage
sql/sql_select.cc:
  Add new user variables for tuning memory usage
sql/sql_test.cc:
  Add information about memory useage if system supports mallinfo()
sql/sql_udf.cc:
  Add new user variables for tuning memory usage
sql/sql_update.cc:
  Add new user variables for tuning memory usage
sql/table.cc:
  Add new user variables for tuning memory usage
2003-10-11 22:00:24 +03:00

36 lines
1.3 KiB
C++

/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult 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 */
#ifdef __GNUC__
#pragma implementation // gcc: Class implementation
#endif
#include "mysql_priv.h"
#include "sql_select.h"
#include "opt_ft.h"
/****************************************************************************
** Create a FT or QUICK RANGE based on a key
****************************************************************************/
QUICK_SELECT *get_ft_or_quick_select_for_ref(THD *thd, TABLE *table,
JOIN_TAB *tab)
{
if (tab->type == JT_FT)
return new FT_SELECT(thd, table, &tab->ref);
return get_quick_select_for_ref(thd, table, &tab->ref);
}