diff options
author | unknown <monty@mashka.mysql.fi> | 2002-08-08 03:29:36 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-08-08 03:29:36 +0300 |
commit | a6b15fdd7682bffc2e197ac50e21332bb9bcf297 (patch) | |
tree | da5d29e4a08217e2773b16c5aef05ab734c760e4 /sql/set_var.cc | |
parent | 93f5a0616ab15113844fa211a26c44182af8018c (diff) | |
parent | f01f49916b7a0ea6eaf9f0e4e1dfad911584f8a2 (diff) | |
download | mariadb-git-a6b15fdd7682bffc2e197ac50e21332bb9bcf297.tar.gz |
merge
BitKeeper/etc/logging_ok:
auto-union
include/my_sys.h:
Auto merged
innobase/include/dyn0dyn.h:
Auto merged
innobase/include/dyn0dyn.ic:
Auto merged
myisam/mi_check.c:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/lex.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index a9882af546a..6aa5450d094 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -186,6 +186,8 @@ sys_var_thd_enum sys_query_cache_type("query_cache_type", sys_var_bool_ptr sys_safe_show_db("safe_show_database", &opt_safe_show_db); sys_var_long_ptr sys_server_id("server_id",&server_id); +sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol", + &opt_slave_compressed_protocol); sys_var_long_ptr sys_slave_net_timeout("slave_net_timeout", &slave_net_timeout); sys_var_long_ptr sys_slow_launch_time("slow_launch_time", @@ -251,6 +253,15 @@ static sys_var_thd_bit sys_buffer_results("sql_buffer_result", static sys_var_thd_bit sys_quote_show_create("sql_quote_show_create", set_option_bit, OPTION_QUOTE_SHOW_CREATE); +static sys_var_thd_bit sys_foreign_key_checks("foreign_key_checks", + set_option_bit, + OPTION_NO_FOREIGN_KEY_CHECKS, + 1); +static sys_var_thd_bit sys_unique_checks("unique_checks", + set_option_bit, + OPTION_RELAXED_UNIQUE_CHECKS, + 1); + /* Local state variables */ @@ -290,6 +301,7 @@ sys_var *sys_variables[]= &sys_delayed_queue_size, &sys_flush, &sys_flush_time, + &sys_foreign_key_checks, &sys_identity, &sys_insert_id, &sys_interactive_timeout, @@ -326,7 +338,7 @@ sys_var *sys_variables[]= #ifdef HAVE_QUERY_CACHE &sys_query_cache_limit, &sys_query_cache_type, -#endif HAVE_QUERY_CACHE +#endif /* HAVE_QUERY_CACHE */ &sys_quote_show_create, &sys_read_buff_size, &sys_read_rnd_buff_size, @@ -335,6 +347,7 @@ sys_var *sys_variables[]= &sys_safe_updates, &sys_select_limit, &sys_server_id, + &sys_slave_compressed_protocol, &sys_slave_net_timeout, &sys_slave_skip_counter, &sys_slow_launch_time, @@ -349,6 +362,7 @@ sys_var *sys_variables[]= &sys_timestamp, &sys_tmp_table_size, &sys_tx_isolation, + &sys_unique_checks }; @@ -403,7 +417,7 @@ struct show_var_st init_vars[]= { {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG }, {"innodb_force_recovery", (char*) &innobase_force_recovery, SHOW_LONG }, {"innodb_thread_concurrency", (char*) &innobase_thread_concurrency, SHOW_LONG }, - {"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_MY_BOOL}, + {"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_LONG}, {"innodb_fast_shutdown", (char*) &innobase_fast_shutdown, SHOW_MY_BOOL}, {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, {"innodb_lock_wait_timeout", (char*) &innobase_lock_wait_timeout, SHOW_LONG }, @@ -988,10 +1002,11 @@ bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) static bool set_option_bit(THD *thd, set_var *var) { - if (var->save_result.ulong_value == 0) - thd->options&= ~((sys_var_thd_bit*) var->var)->bit_flag; + sys_var_thd_bit *sys_var= ((sys_var_thd_bit*) var->var); + if ((var->save_result.ulong_value != 0) == sys_var->reverse) + thd->options&= ~sys_var->bit_flag; else - thd->options|= ((sys_var_thd_bit*) var->var)->bit_flag; + thd->options|= sys_var->bit_flag; return 0; } @@ -1142,7 +1157,7 @@ void set_var_free() 0 Unknown variable (error message is given) */ -sys_var *find_sys_var(const char *str, uint length=0) +sys_var *find_sys_var(const char *str, uint length) { sys_var *var= (sys_var*) hash_search(&system_variable_hash, str, length ? length : |