131
131
static sys_var_session_uint64_t
132
132
sys_auto_increment_increment(&vars, "auto_increment_increment",
133
&SV::auto_increment_increment, NULL, NULL,
134
sys_var::SESSION_VARIABLE_IN_BINLOG);
133
&SV::auto_increment_increment);
135
134
static sys_var_session_uint64_t
136
135
sys_auto_increment_offset(&vars, "auto_increment_offset",
137
&SV::auto_increment_offset, NULL, NULL,
138
sys_var::SESSION_VARIABLE_IN_BINLOG);
136
&SV::auto_increment_offset);
140
138
static sys_var_const_str sys_basedir(&vars, "basedir", drizzle_home);
141
139
static sys_var_session_uint64_t sys_bulk_insert_buff_size(&vars, "bulk_insert_buffer_size",
145
143
check_completion_type,
146
144
fix_completion_type);
147
145
static sys_var_collation_sv
148
sys_collation_server(&vars, "collation_server", &SV::collation_server,
149
&default_charset_info,
150
sys_var::SESSION_VARIABLE_IN_BINLOG);
146
sys_collation_server(&vars, "collation_server", &SV::collation_server, &default_charset_info);
151
147
static sys_var_uint32_t_ptr sys_connect_timeout(&vars, "connect_timeout",
152
148
&connect_timeout);
153
149
static sys_var_const_str sys_datadir(&vars, "datadir", drizzle_real_data_home);
179
175
&SV::max_heap_table_size);
180
176
static sys_var_session_uint64_t sys_pseudo_thread_id(&vars, "pseudo_thread_id",
181
177
&SV::pseudo_thread_id,
182
0, check_pseudo_thread_id,
183
sys_var::SESSION_VARIABLE_IN_BINLOG);
178
0, check_pseudo_thread_id);
184
179
static sys_var_session_ha_rows sys_max_join_size(&vars, "max_join_size",
185
180
&SV::max_join_size,
186
181
fix_max_join_size);
262
257
static sys_var_session_size_t sys_sort_buffer(&vars, "sort_buffer_size",
263
258
&SV::sortbuff_size);
265
sql_mode should *not* have binlog_mode=SESSION_VARIABLE_IN_BINLOG:
266
even though it is written to the binlog, the slave ignores the
267
MODE_NO_DIR_IN_CREATE variable, so slave's value differs from
268
master's (see log_event.cc: Query_log_event::do_apply_event()).
270
259
static sys_var_session_optimizer_switch sys_optimizer_switch(&vars, "optimizer_switch",
271
260
&SV::optimizer_switch);
326
315
OPTION_BUFFER_RESULT);
327
316
static sys_var_session_bit sys_foreign_key_checks(&vars, "foreign_key_checks", 0,
329
OPTION_NO_FOREIGN_KEY_CHECKS,
330
1, sys_var::SESSION_VARIABLE_IN_BINLOG);
318
OPTION_NO_FOREIGN_KEY_CHECKS, 1);
331
319
static sys_var_session_bit sys_unique_checks(&vars, "unique_checks", 0,
333
OPTION_RELAXED_UNIQUE_CHECKS,
335
sys_var::SESSION_VARIABLE_IN_BINLOG);
321
OPTION_RELAXED_UNIQUE_CHECKS, 1);
336
322
/* Local state variables */
338
324
static sys_var_session_ha_rows sys_select_limit(&vars, "sql_select_limit",
339
325
&SV::select_limit);
340
static sys_var_timestamp sys_timestamp(&vars, "timestamp",
341
sys_var::SESSION_VARIABLE_IN_BINLOG);
326
static sys_var_timestamp sys_timestamp(&vars, "timestamp");
342
327
static sys_var_last_insert_id
343
sys_last_insert_id(&vars, "last_insert_id",
344
sys_var::SESSION_VARIABLE_IN_BINLOG);
328
sys_last_insert_id(&vars, "last_insert_id");
346
330
identity is an alias for last_insert_id(), so that we are compatible
349
static sys_var_last_insert_id
350
sys_identity(&vars, "identity", sys_var::SESSION_VARIABLE_IN_BINLOG);
333
static sys_var_last_insert_id sys_identity(&vars, "identity");
352
static sys_var_session_lc_time_names
353
sys_lc_time_names(&vars, "lc_time_names", sys_var::SESSION_VARIABLE_IN_BINLOG);
335
static sys_var_session_lc_time_names sys_lc_time_names(&vars, "lc_time_names");
356
insert_id should *not* be marked as written to the binlog (i.e., it
357
should *not* have binlog_status==SESSION_VARIABLE_IN_BINLOG),
358
because we want any statement that refers to insert_id explicitly to
359
be unsafe. (By "explicitly", we mean using @@session.insert_id,
360
whereas insert_id is used "implicitly" when NULL value is inserted
361
into an auto_increment column).
363
338
We want statements referring explicitly to @@session.insert_id to be
364
339
unsafe, because insert_id is modified internally by the slave sql
365
340
thread when NULL values are inserted in an AUTO_INCREMENT column.
383
358
sys_var_session_uint64_t sys_group_concat_max_len(&vars, "group_concat_max_len",
384
359
&SV::group_concat_max_len);
386
sys_var_session_time_zone sys_time_zone(&vars, "time_zone",
387
sys_var::SESSION_VARIABLE_IN_BINLOG);
361
sys_var_session_time_zone sys_time_zone(&vars, "time_zone");
389
363
/* Global read-only variable containing hostname */
390
364
static sys_var_const_str sys_hostname(&vars, "hostname", glob_hostname);