Drizzled Public API Documentation

system_variables.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2011 Brian Aker
00005  *  Copyright (C) 2008 Sun Microsystems, Inc.
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; version 2 of the License.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #pragma once
00022 
00023 namespace drizzled
00024 {
00025 
00026 struct drizzle_system_variables
00027 {
00028   drizzle_system_variables()
00029   {}
00030   /*
00031     How dynamically allocated system variables are handled:
00032 
00033     The global_system_variables and max_system_variables are "authoritative"
00034     They both should have the same 'version' and 'size'.
00035     When attempting to access a dynamic variable, if the session version
00036     is out of date, then the session version is updated and realloced if
00037     neccessary and bytes copied from global to make up for missing data.
00038   */
00039   ulong dynamic_variables_version;
00040   char * dynamic_variables_ptr;
00041   uint32_t dynamic_variables_head;  /* largest valid variable offset */
00042   uint32_t dynamic_variables_size;  /* how many bytes are in use */
00043 
00044   uint64_t myisam_max_extra_sort_file_size;
00045   uint64_t max_heap_table_size;
00046   uint64_t tmp_table_size;
00047   ha_rows select_limit;
00048   ha_rows max_join_size;
00049   uint64_t auto_increment_increment;
00050   uint64_t auto_increment_offset;
00051   uint64_t bulk_insert_buff_size;
00052   uint64_t join_buff_size;
00053   uint32_t max_allowed_packet;
00054   uint64_t max_error_count;
00055   uint64_t max_length_for_sort_data;
00056   size_t max_sort_length;
00057   uint64_t min_examined_row_limit;
00058   bool optimizer_prune_level;
00059   bool log_warnings;
00060 
00061   uint32_t optimizer_search_depth;
00062   uint32_t div_precincrement;
00063   uint64_t preload_buff_size;
00064   uint32_t read_buff_size;
00065   uint32_t read_rnd_buff_size;
00066   bool replicate_query;
00067   size_t sortbuff_size;
00068   uint32_t thread_handling;
00069   uint32_t tx_isolation;
00070   uint32_t completion_type;
00071   /* Determines which non-standard SQL behaviour should be enabled */
00072   uint32_t sql_mode;
00073   uint64_t max_seeks_for_key;
00074   size_t range_alloc_block_size;
00075   uint32_t query_alloc_block_size;
00076   uint32_t query_prealloc_size;
00077   uint64_t group_concat_max_len;
00078   uint64_t pseudo_thread_id;
00079 
00080   plugin::StorageEngine *storage_engine;
00081 
00082   /* Only charset part of these variables is sensible */
00083   const CHARSET_INFO  *character_set_filesystem;
00084 
00085   /* Both charset and collation parts of these variables are important */
00086   const CHARSET_INFO  *collation_server;
00087 
00088   inline const CHARSET_INFO  *getCollation(void) 
00089   {
00090     return collation_server;
00091   }
00092 
00093   /* Locale Support */
00094   MY_LOCALE *lc_time_names;
00095 
00096   Time_zone *time_zone;
00097 };
00098 
00099 
00100 } /* namespace drizzled */
00101