104
104
array_elements(bool_type_names)-1, "", bool_type_names, NULL
107
static bool set_option_bit(Session *session, set_var *var);
108
static bool set_option_autocommit(Session *session, set_var *var);
109
static int check_pseudo_thread_id(Session *session, set_var *var);
110
static int check_tx_isolation(Session *session, set_var *var);
111
static void fix_tx_isolation(Session *session, sql_var_t type);
112
static int check_completion_type(Session *session, set_var *var);
113
static void fix_completion_type(Session *session, sql_var_t type);
114
static void fix_max_join_size(Session *session, sql_var_t type);
115
static void fix_session_mem_root(Session *session, sql_var_t type);
116
static void fix_server_id(Session *session, sql_var_t type);
117
void throw_bounds_warning(Session *session, bool fixed, bool unsignd, const std::string &name, int64_t val);
118
static unsigned char *get_error_count(Session *session);
119
static unsigned char *get_warning_count(Session *session);
120
static unsigned char *get_tmpdir(Session *session);
107
static bool set_option_bit(Session*, set_var*);
108
static bool set_option_autocommit(Session*, set_var*);
109
static int check_pseudo_thread_id(Session*, set_var*);
110
static int check_tx_isolation(Session*, set_var*);
111
static void fix_tx_isolation(Session*, sql_var_t);
112
static int check_completion_type(Session*, set_var*);
113
static void fix_max_join_size(Session*, sql_var_t);
114
static void fix_session_mem_root(Session*, sql_var_t);
115
void throw_bounds_warning(Session*, bool fixed, bool unsignd, const std::string &name, int64_t);
116
static unsigned char *get_error_count(Session*);
117
static unsigned char *get_warning_count(Session*);
118
static unsigned char *get_tmpdir(Session*);
123
121
Variable definition list
129
127
it in the constructor (see sys_var class for details).
131
129
static sys_var_session_uint64_t
132
sys_auto_increment_increment("auto_increment_increment",
133
&drizzle_system_variables::auto_increment_increment);
130
sys_auto_increment_increment("auto_increment_increment", &drizzle_system_variables::auto_increment_increment);
134
131
static sys_var_session_uint64_t
135
sys_auto_increment_offset("auto_increment_offset",
136
&drizzle_system_variables::auto_increment_offset);
132
sys_auto_increment_offset("auto_increment_offset", &drizzle_system_variables::auto_increment_offset);
138
134
static sys_var_fs_path sys_basedir("basedir", basedir);
139
135
static sys_var_fs_path sys_pid_file("pid_file", pid_file);
140
136
static sys_var_fs_path sys_plugin_dir("plugin_dir", plugin_dir);
142
static sys_var_size_t_ptr sys_thread_stack_size("thread_stack",
143
&my_thread_stack_size);
138
static sys_var_size_t_ptr sys_thread_stack_size("thread_stack", &my_thread_stack_size);
144
139
static sys_var_constrained_value_readonly<uint32_t> sys_back_log("back_log", back_log);
146
static sys_var_session_uint64_t sys_bulk_insert_buff_size("bulk_insert_buffer_size",
147
&drizzle_system_variables::bulk_insert_buff_size);
148
static sys_var_session_uint32_t sys_completion_type("completion_type",
149
&drizzle_system_variables::completion_type,
150
check_completion_type,
151
fix_completion_type);
141
static sys_var_session_uint64_t sys_bulk_insert_buff_size("bulk_insert_buffer_size", &drizzle_system_variables::bulk_insert_buff_size);
142
static sys_var_session_uint32_t sys_completion_type("completion_type", &drizzle_system_variables::completion_type, check_completion_type);
152
143
static sys_var_collation_sv
153
144
sys_collation_server("collation_server", &drizzle_system_variables::collation_server, &default_charset_info);
154
static sys_var_fs_path sys_datadir("datadir", getDataHome());
156
static sys_var_session_uint64_t sys_join_buffer_size("join_buffer_size",
157
&drizzle_system_variables::join_buff_size);
158
static sys_var_session_uint32_t sys_max_allowed_packet("max_allowed_packet",
159
&drizzle_system_variables::max_allowed_packet);
160
static sys_var_session_uint64_t sys_max_error_count("max_error_count",
161
&drizzle_system_variables::max_error_count);
162
static sys_var_session_uint64_t sys_max_heap_table_size("max_heap_table_size",
163
&drizzle_system_variables::max_heap_table_size);
164
static sys_var_session_uint64_t sys_pseudo_thread_id("pseudo_thread_id",
165
&drizzle_system_variables::pseudo_thread_id,
166
0, check_pseudo_thread_id);
167
static sys_var_session_ha_rows sys_max_join_size("max_join_size",
168
&drizzle_system_variables::max_join_size,
170
static sys_var_session_uint64_t sys_max_seeks_for_key("max_seeks_for_key",
171
&drizzle_system_variables::max_seeks_for_key);
172
static sys_var_session_uint64_t sys_max_length_for_sort_data("max_length_for_sort_data",
173
&drizzle_system_variables::max_length_for_sort_data);
174
static sys_var_session_size_t sys_max_sort_length("max_sort_length",
175
&drizzle_system_variables::max_sort_length);
176
static sys_var_uint64_t_ptr sys_max_write_lock_count("max_write_lock_count",
177
&max_write_lock_count);
178
static sys_var_session_uint64_t sys_min_examined_row_limit("min_examined_row_limit",
179
&drizzle_system_variables::min_examined_row_limit);
181
/* these two cannot be static */
182
static sys_var_session_bool sys_optimizer_prune_level("optimizer_prune_level",
183
&drizzle_system_variables::optimizer_prune_level);
184
static sys_var_session_uint32_t sys_optimizer_search_depth("optimizer_search_depth",
185
&drizzle_system_variables::optimizer_search_depth);
187
static sys_var_session_uint64_t sys_preload_buff_size("preload_buffer_size",
188
&drizzle_system_variables::preload_buff_size);
189
static sys_var_session_uint32_t sys_read_buff_size("read_buffer_size",
190
&drizzle_system_variables::read_buff_size);
191
static sys_var_session_uint32_t sys_read_rnd_buff_size("read_rnd_buffer_size",
192
&drizzle_system_variables::read_rnd_buff_size);
193
static sys_var_session_uint32_t sys_div_precincrement("div_precision_increment",
194
&drizzle_system_variables::div_precincrement);
196
static sys_var_session_size_t sys_range_alloc_block_size("range_alloc_block_size",
197
&drizzle_system_variables::range_alloc_block_size);
199
static sys_var_session_bool sys_replicate_query("replicate_query",
200
&drizzle_system_variables::replicate_query);
202
static sys_var_session_uint32_t sys_query_alloc_block_size("query_alloc_block_size",
203
&drizzle_system_variables::query_alloc_block_size,
204
NULL, fix_session_mem_root);
205
static sys_var_session_uint32_t sys_query_prealloc_size("query_prealloc_size",
206
&drizzle_system_variables::query_prealloc_size,
207
NULL, fix_session_mem_root);
145
static sys_var_fs_path sys_datadir("datadir", getDataHome());
147
static sys_var_session_uint64_t sys_join_buffer_size("join_buffer_size", &drizzle_system_variables::join_buff_size);
148
static sys_var_session_uint32_t sys_max_allowed_packet("max_allowed_packet", &drizzle_system_variables::max_allowed_packet);
149
static sys_var_session_uint64_t sys_max_error_count("max_error_count", &drizzle_system_variables::max_error_count);
150
static sys_var_session_uint64_t sys_max_heap_table_size("max_heap_table_size", &drizzle_system_variables::max_heap_table_size);
151
static sys_var_session_uint64_t sys_pseudo_thread_id("pseudo_thread_id", &drizzle_system_variables::pseudo_thread_id, 0, check_pseudo_thread_id);
152
static sys_var_session_ha_rows sys_max_join_size("max_join_size", &drizzle_system_variables::max_join_size, fix_max_join_size);
153
static sys_var_session_uint64_t sys_max_seeks_for_key("max_seeks_for_key", &drizzle_system_variables::max_seeks_for_key);
154
static sys_var_session_uint64_t sys_max_length_for_sort_data("max_length_for_sort_data", &drizzle_system_variables::max_length_for_sort_data);
155
static sys_var_session_size_t sys_max_sort_length("max_sort_length", &drizzle_system_variables::max_sort_length);
156
static sys_var_uint64_t_ptr sys_max_write_lock_count("max_write_lock_count", &max_write_lock_count);
157
static sys_var_session_uint64_t sys_min_examined_row_limit("min_examined_row_limit", &drizzle_system_variables::min_examined_row_limit);
159
static sys_var_session_bool sys_optimizer_prune_level("optimizer_prune_level", &drizzle_system_variables::optimizer_prune_level);
160
static sys_var_session_uint32_t sys_optimizer_search_depth("optimizer_search_depth", &drizzle_system_variables::optimizer_search_depth);
162
static sys_var_session_uint64_t sys_preload_buff_size("preload_buffer_size", &drizzle_system_variables::preload_buff_size);
163
static sys_var_session_uint32_t sys_read_buff_size("read_buffer_size", &drizzle_system_variables::read_buff_size);
164
static sys_var_session_uint32_t sys_read_rnd_buff_size("read_rnd_buffer_size", &drizzle_system_variables::read_rnd_buff_size);
165
static sys_var_session_uint32_t sys_div_precincrement("div_precision_increment", &drizzle_system_variables::div_precincrement);
167
static sys_var_session_size_t sys_range_alloc_block_size("range_alloc_block_size", &drizzle_system_variables::range_alloc_block_size);
169
static sys_var_session_bool sys_replicate_query("replicate_query", &drizzle_system_variables::replicate_query);
171
static sys_var_session_uint32_t sys_query_alloc_block_size("query_alloc_block_size", &drizzle_system_variables::query_alloc_block_size, NULL, fix_session_mem_root);
172
static sys_var_session_uint32_t sys_query_prealloc_size("query_prealloc_size", &drizzle_system_variables::query_prealloc_size, NULL, fix_session_mem_root);
208
173
static sys_var_readonly sys_tmpdir("tmpdir", OPT_GLOBAL, SHOW_CHAR, get_tmpdir);
210
static sys_var_fs_path sys_secure_file_priv("secure_file_priv",
213
static sys_var_const_str_ptr sys_scheduler("scheduler",
214
(char**)&opt_scheduler);
216
static sys_var_uint32_t_ptr sys_server_id("server_id", &server_id,
175
static sys_var_fs_path sys_secure_file_priv("secure_file_priv", secure_file_priv);
176
static sys_var_const_str_ptr sys_scheduler("scheduler", (char**)&opt_scheduler);
178
static sys_var_uint32_t_ptr sys_server_id("server_id", &server_id);
219
180
static sys_var_const_string sys_server_uuid("server_uuid", server_uuid);
221
static sys_var_session_size_t sys_sort_buffer("sort_buffer_size",
222
&drizzle_system_variables::sortbuff_size);
224
static sys_var_size_t_ptr_readonly sys_transaction_message_threshold("transaction_message_threshold",
225
&transaction_message_threshold);
227
static sys_var_session_storage_engine sys_storage_engine("storage_engine",
228
&drizzle_system_variables::storage_engine);
229
static sys_var_size_t_ptr sys_table_def_size("table_definition_cache",
231
static sys_var_uint64_t_ptr sys_table_cache_size("table_open_cache",
233
static sys_var_uint64_t_ptr sys_table_lock_wait_timeout("table_lock_wait_timeout",
234
&table_lock_wait_timeout);
182
static sys_var_session_size_t sys_sort_buffer("sort_buffer_size", &drizzle_system_variables::sortbuff_size);
184
static sys_var_size_t_ptr_readonly sys_transaction_message_threshold("transaction_message_threshold", &transaction_message_threshold);
186
static sys_var_session_storage_engine sys_storage_engine("storage_engine", &drizzle_system_variables::storage_engine);
187
static sys_var_size_t_ptr sys_table_def_size("table_definition_cache", &table_def_size);
188
static sys_var_uint64_t_ptr sys_table_cache_size("table_open_cache", &table_cache_size);
189
static sys_var_uint64_t_ptr sys_table_lock_wait_timeout("table_lock_wait_timeout", &table_lock_wait_timeout);
235
190
static sys_var_session_enum sys_tx_isolation("tx_isolation",
236
191
&drizzle_system_variables::tx_isolation,
237
192
&tx_isolation_typelib,
242
197
static sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", &internal::timed_mutexes);
243
198
static sys_var_const_str sys_version("version", version().c_str());
245
static sys_var_const_str sys_version_comment("version_comment",
246
COMPILATION_COMMENT);
247
static sys_var_const_str sys_version_compile_machine("version_compile_machine",
249
static sys_var_const_str sys_version_compile_os("version_compile_os",
251
static sys_var_const_str sys_version_compile_vendor("version_compile_vendor",
200
static sys_var_const_str sys_version_comment("version_comment", COMPILATION_COMMENT);
201
static sys_var_const_str sys_version_compile_machine("version_compile_machine", HOST_CPU);
202
static sys_var_const_str sys_version_compile_os("version_compile_os", HOST_OS);
203
static sys_var_const_str sys_version_compile_vendor("version_compile_vendor", HOST_VENDOR);
254
205
/* Variables that are bits in Session */
256
sys_var_session_bit sys_autocommit("autocommit", 0,
257
set_option_autocommit,
258
OPTION_NOT_AUTOCOMMIT,
260
static sys_var_session_bit sys_big_selects("sql_big_selects", 0,
263
static sys_var_session_bit sys_sql_warnings("sql_warnings", 0,
266
static sys_var_session_bit sys_sql_notes("sql_notes", 0,
269
static sys_var_session_bit sys_buffer_results("sql_buffer_result", 0,
271
OPTION_BUFFER_RESULT);
272
static sys_var_session_bit sys_foreign_key_checks("foreign_key_checks", 0,
274
OPTION_NO_FOREIGN_KEY_CHECKS, 1);
275
static sys_var_session_bit sys_unique_checks("unique_checks", 0,
277
OPTION_RELAXED_UNIQUE_CHECKS, 1);
207
sys_var_session_bit sys_autocommit("autocommit", 0, set_option_autocommit, OPTION_NOT_AUTOCOMMIT, 1);
208
static sys_var_session_bit sys_big_selects("sql_big_selects", 0, set_option_bit, OPTION_BIG_SELECTS);
209
static sys_var_session_bit sys_sql_warnings("sql_warnings", 0, set_option_bit, OPTION_WARNINGS);
210
static sys_var_session_bit sys_sql_notes("sql_notes", 0, set_option_bit, OPTION_SQL_NOTES);
211
static sys_var_session_bit sys_buffer_results("sql_buffer_result", 0, set_option_bit, OPTION_BUFFER_RESULT);
212
static sys_var_session_bit sys_foreign_key_checks("foreign_key_checks", 0, set_option_bit, OPTION_NO_FOREIGN_KEY_CHECKS, 1);
213
static sys_var_session_bit sys_unique_checks("unique_checks", 0, set_option_bit, OPTION_RELAXED_UNIQUE_CHECKS, 1);
278
214
/* Local state variables */
280
static sys_var_session_ha_rows sys_select_limit("sql_select_limit",
281
&drizzle_system_variables::select_limit);
216
static sys_var_session_ha_rows sys_select_limit("sql_select_limit", &drizzle_system_variables::select_limit);
282
217
static sys_var_timestamp sys_timestamp("timestamp");
283
218
static sys_var_last_insert_id
284
219
sys_last_insert_id("last_insert_id");