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 struct drizzle_system_variables
00026 {
00027   /*
00028     How dynamically allocated system variables are handled:
00029 
00030     The global_system_variables and max_system_variables are "authoritative"
00031     They both should have the same 'version' and 'size'.
00032     When attempting to access a dynamic variable, if the session version
00033     is out of date, then the session version is updated and realloced if
00034     neccessary and bytes copied from global to make up for missing data.
00035   */
00036   ulong dynamic_variables_version;
00037   char * dynamic_variables_ptr;
00038   uint32_t dynamic_variables_head;  /* largest valid variable offset */
00039   uint32_t dynamic_variables_size;  /* how many bytes are in use */
00040 
00041   uint64_t myisam_max_extra_sort_file_size;
00042   uint64_t max_heap_table_size;
00043   uint64_t tmp_table_size;
00044   ha_rows select_limit;
00045   ha_rows max_join_size;
00046   uint64_t auto_increment_increment;
00047   uint64_t auto_increment_offset;
00048   uint64_t bulk_insert_buff_size;
00049   uint64_t join_buff_size;
00050   uint32_t max_allowed_packet;
00051   uint64_t max_error_count;
00052   uint64_t max_length_for_sort_data;
00053   size_t max_sort_length;
00054   uint64_t min_examined_row_limit;
00055   bool optimizer_prune_level;
00056   bool log_warnings;
00057 
00058   uint32_t optimizer_search_depth;
00059   uint32_t div_precincrement;
00060   uint64_t preload_buff_size;
00061   uint32_t read_buff_size;
00062   uint32_t read_rnd_buff_size;
00063   bool replicate_query;
00064   size_t sortbuff_size;
00065   uint32_t thread_handling;
00066   uint32_t tx_isolation;
00067   uint32_t completion_type;
00068   /* Determines which non-standard SQL behaviour should be enabled */
00069   uint32_t sql_mode;
00070   uint64_t max_seeks_for_key;
00071   size_t range_alloc_block_size;
00072   uint32_t query_alloc_block_size;
00073   uint32_t query_prealloc_size;
00074   uint64_t group_concat_max_len;
00075   uint64_t pseudo_thread_id;
00076 
00077   plugin::StorageEngine *storage_engine;
00078 
00079   /* Only charset part of these variables is sensible */
00080   const charset_info_st  *character_set_filesystem;
00081 
00082   /* Both charset and collation parts of these variables are important */
00083   const charset_info_st *collation_server;
00084 
00085   const charset_info_st* getCollation() const
00086   {
00087     return collation_server;
00088   }
00089 
00090   /* Locale Support */
00091   MY_LOCALE *lc_time_names;
00092 };
00093 
00094 
00095 } /* namespace drizzled */
00096