The world's most popular open source database
#include <my_global.h>#include <mysql_version.h>#include <mysql_embed.h>#include <my_sys.h>#include <my_time.h>#include <m_string.h>#include <hash.h>#include <signal.h>#include <thr_lock.h>#include <my_base.h>#include "sql_bitmap.h"#include "sql_array.h"#include "mysql_com.h"#include <violite.h>#include "unireg.h"#include "sql_string.h"#include "sql_list.h"#include "sql_map.h"#include "my_decimal.h"#include "sql_plugin.h"#include "handler.h"#include "parse_file.h"#include "table.h"#include "sql_error.h"#include "field.h"#include "protocol.h"#include "sql_udf.h"#include "sql_partition.h"#include "item.h"#include "sql_class.h"#include "sql_acl.h"#include "tztime.h"Include dependency graph for mysql_priv.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
| #define ACL_ALLOC_BLOCK_SIZE 1024 |
| #define ACL_CACHE_SIZE 256 |
Definition at line 90 of file mysql_priv.h.
| #define BDB_LOG_ALLOC_BLOCK_SIZE 1024 |
Definition at line 147 of file mysql_priv.h.
| #define BINLOG_DUMP_NON_BLOCK 1 |
Definition at line 407 of file mysql_priv.h.
| #define BLOCKS_IN_AVG_SEEK 128 |
Definition at line 181 of file mysql_priv.h.
| #define CONNECT_PRIOR 9 |
| #define CONNECT_TIMEOUT 5 |
| #define current_thd _current_thd() |
Definition at line 503 of file mysql_priv.h.
Referenced by agg_item_charsets(), Item_cache_row::allocate(), ha_myisammrg::append_create_info(), field_decimal::avg(), check_duplicates_in_interval(), check_simple_select(), check_stack_overrun(), Item_str_func::check_well_formed_result(), clean_up(), Item_func_group_concat::cleanup(), Log_to_csv_event_handler::close_log_table(), collect_longlong(), collect_real(), collect_ulonglong(), Event_timed::compute_next_execution_time(), Item_func_get_user_var::const_item(), copy_data_between_tables(), create_default(), create_func_cast(), create_func_connection_id(), create_func_found_rows(), create_func_get_lock(), create_func_is_free_lock(), create_func_is_used_lock(), create_func_release_lock(), create_func_sleep(), create_func_space(), create_func_uuid(), create_load_file(), create_select_for_variable(), Item_sum_hybrid::create_tmp_field(), date_add_interval(), decimal_operation_results(), Item::default_charset(), do_varstring1(), do_varstring2(), ha_myisam::enable_indexes(), end_thread_signal(), Item_func_sp::execute(), extract_date_time(), exts_handlerton(), find_all_keys(), find_field_in_group_list(), find_item_in_list(), find_order_in_list(), Item_ref::fix_fields(), Item_xml_str_func::fix_length_and_dec(), Item_func_from_unixtime::fix_length_and_dec(), Item_sum_variance::fix_length_and_dec(), Item_sum_avg::fix_length_and_dec(), Item_sum_avg_distinct::fix_length_and_dec(), Item_func_sp::fix_length_and_dec(), Item_func_get_user_var::fix_length_and_dec(), Item_func_div::fix_length_and_dec(), Item_func_minus::fix_length_and_dec(), Item_func_in::fix_length_and_dec(), Item_func_case::fix_length_and_dec(), Item_func_between::fix_length_and_dec(), Item_bool_func2::fix_length_and_dec(), fix_query_cache_size(), Item_func_sp::func_name(), Field_time::get_date(), Field_timestamp::get_date(), get_new_handler(), get_schema_partitions_record(), get_variable(), ha_known_exts(), handle_one_connection(), handle_segfault(), st_ha_check_opt::init(), sys_var_thd_binlog_format::is_readonly(), Item::Item(), Item_func_sp::Item_func_sp(), Log_to_csv_event_handler::log_general(), Log_to_csv_event_handler::log_slow(), make_date_time(), map_file(), Item_sum::mark_as_sum_func(), merge_buffers(), my_message_sql(), my_tz_find(), my_yyoverflow(), mysql_create_frm(), mysql_rename_table(), MYSQLerror(), MYSQL_BIN_LOG::new_file_impl(), Log_to_csv_event_handler::open_log_table(), open_table_error(), pack_header(), Item_xml_str_func::parse_xml(), Item_ref::print(), Item_ident::print(), Item::print_item_w_name(), Handle_old_incorrect_trigger_table_hook::process_unknown_string(), Handle_old_incorrect_sql_modes_hook::process_unknown_string(), quick_rm_table(), Log_event::read_log_event(), resolve_ref_in_select_and_group(), Item_func_get_user_var::result_type(), rm_temporary_table(), Item_string::safe_charset_converter(), Field::set_datetime_warning(), set_field_to_null(), set_field_to_null_with_conversions(), Item::set_name(), Item_user_var_as_out_param::set_null_value(), Item_param::set_time(), Field_timestamp::set_time(), Item_user_var_as_out_param::set_value(), Field::set_warning(), Item_func::signal_divide_by_null(), Field_blob::sort_length(), Item_func_sp::sp_result_field(), Event_timed::spawn_now(), sql_alloc_error_handler(), ha_myisam::start_bulk_insert(), field_decimal::std(), Event_scheduler::stop(), Field_string::store(), Field_datetime::store(), Field_newdate::store(), Field_date::store(), Field_timestamp::store(), store_natural_using_join_columns(), Item_func_sysdate_local::store_now_in_TIME(), Item_func_now_utc::store_now_in_TIME(), Item_func_now_local::store_now_in_TIME(), Item_func_curtime_utc::store_now_in_TIME(), Item_func_curtime_local::store_now_in_TIME(), Item_func_curdate_utc::store_now_in_TIME(), Item_func_curdate_local::store_now_in_TIME(), store_position_for_column(), cmp_item_row::store_value(), str_to_datetime_with_warn(), str_to_time_with_warn(), subselect_union_engine::subselect_union_engine(), thd_increment_bytes_received(), thd_increment_bytes_sent(), thd_increment_net_big_packet_count(), Item_func::transform(), ha_myisammrg::update_create_info(), Item_func_set_user_var::update_hash(), Item_decimal_typecast::val_decimal(), Item::val_decimal_from_string(), Item_extract::val_int(), Item_func_unix_timestamp::val_int(), Item_func_found_rows::val_int(), Item_func_row_count::val_int(), Item_func_sleep::val_int(), Item_func_benchmark::val_int(), Item_func_last_insert_id::val_int(), Item_func_release_lock::val_int(), Item_func_get_lock::val_int(), Item_master_pos_wait::val_int(), Item_func_unsigned::val_int(), Item_func_signed::val_int(), Item_string::val_int(), Field_timestamp::val_int(), Field_double::val_int(), Field_long::val_int(), Item_func_signed::val_int_from_str(), Item_string::val_real(), Item_char_typecast::val_str(), Item_func_dayname::val_str(), Item_func_monthname::val_str(), Item_func_uuid::val_str(), Item_load_file::val_str(), Item_func_lpad::val_str(), Item_func_rpad::val_str(), Item_func_repeat::val_str(), Item_func_database::val_str(), Item_func_encrypt::val_str(), Item_func_insert::val_str(), Item_func_replace::val_str(), Item_func_concat_ws::val_str(), Item_func_des_decrypt::val_str(), Item_func_des_encrypt::val_str(), Item_func_concat::val_str(), Field_timestamp::val_str(), write_record(), and QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT().
| #define DBUG_SYNC_POINT | ( | lock_name, | |||
| lock_timeout | ) |
Definition at line 402 of file mysql_priv.h.
| #define DEFAULT_CONCURRENCY 10 |
Definition at line 212 of file mysql_priv.h.
| #define DELAYED_LIMIT 100 |
Definition at line 213 of file mysql_priv.h.
| #define DELAYED_QUEUE_SIZE 1000 |
Definition at line 214 of file mysql_priv.h.
| #define DELAYED_WAIT_TIMEOUT 5*60 |
Definition at line 215 of file mysql_priv.h.
| #define DISK_SEEK_BASE_COST ((double)0.5) |
| #define DISK_SEEK_PROP_COST ((double)0.5/BLOCKS_IN_AVG_SEEK) |
| #define FLUSH_TIME 0 |
Definition at line 216 of file mysql_priv.h.
| #define HOST_CACHE_SIZE 128 |
| #define IF_NETWARE | ( | A, | |||
| B | ) | (B) |
Definition at line 222 of file mysql_priv.h.
| #define IF_WIN | ( | A, | |||
| B | ) | (B) |
| #define INTERRUPT_PRIOR 10 |
Definition at line 236 of file mysql_priv.h.
Referenced by signal_hand(), and start_signal_handler().
| #define IS_EQUAL_NO 0 |
Definition at line 439 of file mysql_priv.h.
Referenced by ha_myisam::check_if_incompatible_data(), and Field_varstring::is_equal().
| #define IS_EQUAL_PACK_LENGTH 2 |
Definition at line 441 of file mysql_priv.h.
Referenced by ha_myisam::check_if_incompatible_data(), and Field_varstring::is_equal().
| #define IS_EQUAL_YES 1 |
Definition at line 440 of file mysql_priv.h.
Referenced by ha_heap::check_if_incompatible_data(), and Field_varstring::is_equal().
| #define KEY_DEFAULT_PACK_LENGTH 8 |
Definition at line 194 of file mysql_priv.h.
| #define MATCHING_ROWS_IN_OTHER_TABLE 10 |
| #define MAX_ACCEPT_RETRY 10 |
| #define MAX_CONNECT_ERRORS 10 |
Definition at line 217 of file mysql_priv.h.
| #define MAX_FIELDS_BEFORE_HASH 32 |
Definition at line 129 of file mysql_priv.h.
| #define MAX_PASSWORD_LENGTH 32 |
Definition at line 126 of file mysql_priv.h.
| #define MAX_TIME_ZONE_NAME_LENGTH 72 |
Definition at line 329 of file mysql_priv.h.
Referenced by sys_var_thd_time_zone::check(), and Query_log_event::write().
| #define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (10L*1024*1024) |
| #define MIN_ROWS_TO_USE_BULK_INSERT 100 |
Definition at line 157 of file mysql_priv.h.
| #define MIN_ROWS_TO_USE_TABLE_CACHE 100 |
| #define MODE_ANSI (MODE_MYSQL40*2) |
Definition at line 353 of file mysql_priv.h.
Referenced by fix_sql_mode(), get_one_option(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_ANSI_QUOTES 4 |
Definition at line 337 of file mysql_priv.h.
Referenced by fix_sql_mode(), get_quote_char_for_identifier(), mysql_make_view(), mysql_register_view(), and MYSQLlex().
| #define MODE_DB2 2048 |
Definition at line 346 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_ERROR_FOR_DIVISION_BY_ZERO (MODE_INVALID_DATES*2) |
Definition at line 361 of file mysql_priv.h.
Referenced by fix_sql_mode(), and Item_func::signal_divide_by_null().
| #define MODE_HIGH_NOT_PRECEDENCE (MODE_NO_AUTO_CREATE_USER*2) |
| #define MODE_IGNORE_SPACE 8 |
Definition at line 338 of file mysql_priv.h.
Referenced by check_connection(), fix_sql_mode(), lex_start(), and mysql_make_view().
| #define MODE_INVALID_DATES (MODE_NO_ZERO_DATE*2) |
Definition at line 360 of file mysql_priv.h.
Referenced by convert_constant_item(), field_conv(), get_mm_leaf(), Field_datetime::store(), Field_newdate::store(), Field_date::store(), and str_to_datetime_with_warn().
| #define MODE_MAXDB 4096 |
Definition at line 347 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_MSSQL 1024 |
Definition at line 345 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_MYSQL323 65536 |
Definition at line 351 of file mysql_priv.h.
Referenced by fix_sql_mode(), Field_varstring::sql_type(), Field_string::sql_type(), store_create_info(), store_key_options(), and ha_heap::table_type().
| #define MODE_MYSQL40 (MODE_MYSQL323*2) |
Definition at line 352 of file mysql_priv.h.
Referenced by fix_sql_mode(), Field_varstring::sql_type(), Field_string::sql_type(), store_create_info(), and store_key_options().
| #define MODE_NO_AUTO_CREATE_USER (MODE_TRADITIONAL*2) |
Definition at line 363 of file mysql_priv.h.
Referenced by fix_sql_mode(), mysql_grant(), mysql_routine_grant(), and mysql_table_grant().
| #define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2) |
Definition at line 354 of file mysql_priv.h.
Referenced by copy_data_between_tables(), and handler::update_auto_increment().
| #define MODE_NO_BACKSLASH_ESCAPES (MODE_NO_AUTO_VALUE_ON_ZERO*2) |
Definition at line 355 of file mysql_priv.h.
Referenced by Item_func_like::fix_fields(), fix_sql_mode_var(), get_text(), and mysql_make_view().
| #define MODE_NO_DIR_IN_CREATE 128 |
Definition at line 342 of file mysql_priv.h.
Referenced by append_directory(), and mysql_create_table_internal().
| #define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2) |
| #define MODE_NO_FIELD_OPTIONS 32768 |
Definition at line 350 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), and store_key_options().
| #define MODE_NO_KEY_OPTIONS 8192 |
| #define MODE_NO_TABLE_OPTIONS 16384 |
| #define MODE_NO_UNSIGNED_SUBTRACTION 64 |
| #define MODE_NO_ZERO_DATE (MODE_NO_ZERO_IN_DATE*2) |
Definition at line 359 of file mysql_priv.h.
Referenced by field_conv(), fix_sql_mode(), Field_datetime::store(), Field_newdate::store(), Field_date::store(), Field_timestamp::store(), and str_to_datetime_with_warn().
| #define MODE_NO_ZERO_IN_DATE (MODE_STRICT_ALL_TABLES*2) |
Definition at line 358 of file mysql_priv.h.
Referenced by field_conv(), fix_sql_mode(), Field_datetime::store(), Field_newdate::store(), Field_date::store(), and Field_timestamp::store().
| #define MODE_NOT_USED 16 |
Definition at line 339 of file mysql_priv.h.
| #define MODE_ONLY_FULL_GROUP_BY 32 |
Definition at line 340 of file mysql_priv.h.
Referenced by resolve_ref_in_select_and_group(), and setup_group().
| #define MODE_ORACLE 512 |
Definition at line 344 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_PIPES_AS_CONCAT 2 |
Definition at line 336 of file mysql_priv.h.
Referenced by find_keyword(), fix_sql_mode(), and mysql_make_view().
| #define MODE_POSTGRESQL 256 |
Definition at line 343 of file mysql_priv.h.
Referenced by fix_sql_mode(), store_create_info(), store_key_options(), and view_store_create_info().
| #define MODE_REAL_AS_FLOAT 1 |
| #define MODE_STRICT_ALL_TABLES (MODE_STRICT_TRANS_TABLES*2) |
Definition at line 357 of file mysql_priv.h.
Referenced by Item_str_func::check_well_formed_result(), copy_data_between_tables(), sp_head::execute(), fix_sql_mode(), create_field::init(), mysql_create_frm(), mysql_insert(), mysql_load(), mysql_multi_update(), pack_header(), prepare_blob_field(), and sp_eval_expr().
| #define MODE_STRICT_TRANS_TABLES (MODE_NO_BACKSLASH_ESCAPES*2) |
Definition at line 356 of file mysql_priv.h.
Referenced by Item_str_func::check_well_formed_result(), copy_data_between_tables(), sp_head::execute(), fix_sql_mode(), create_field::init(), mysql_create_frm(), mysql_insert(), mysql_load(), mysql_multi_update(), pack_header(), prepare_blob_field(), and sp_eval_expr().
| #define MODE_TRADITIONAL (MODE_ERROR_FOR_DIVISION_BY_ZERO*2) |
| #define MY_CHARSET_BIN_MB_MAXLEN 1 |
Definition at line 379 of file mysql_priv.h.
Referenced by Item_func_get_format::fix_length_and_dec(), Item_func_maketime::fix_length_and_dec(), Item_func_timediff::fix_length_and_dec(), Item_func_makedate::fix_length_and_dec(), Item_func_sec_to_time::fix_length_and_dec(), Item_date::fix_length_and_dec(), Item_func_time_to_sec::fix_length_and_dec(), Item_func_unix_timestamp::fix_length_and_dec(), Item_func_dayname::fix_length_and_dec(), Item_func_weekday::fix_length_and_dec(), Item_func_year::fix_length_and_dec(), Item_func_yearweek::fix_length_and_dec(), Item_func_week::fix_length_and_dec(), Item_func_second::fix_length_and_dec(), Item_func_quarter::fix_length_and_dec(), Item_func_minute::fix_length_and_dec(), Item_func_hour::fix_length_and_dec(), Item_func_dayofyear::fix_length_and_dec(), Item_func_month::fix_length_and_dec(), Item_func_dayofmonth::fix_length_and_dec(), Item_func_to_days::fix_length_and_dec(), Item_func_period_diff::fix_length_and_dec(), Item_func_period_add::fix_length_and_dec(), Item_func_str_to_date::fix_length_and_dec(), Item_func_add_time::fix_length_and_dec(), Item_date_add_interval::fix_length_and_dec(), Item_func_convert_tz::fix_length_and_dec(), Item_func_from_unixtime::fix_length_and_dec(), Item_func_sysdate_local::fix_length_and_dec(), Item_func_curdate::fix_length_and_dec(), Event_timed::init_interval(), set_param_date(), set_param_datetime(), set_param_time(), Item_func_convert_tz::val_str(), and Item_func_from_unixtime::val_str().
| #define MYSQLD_NET_RETRY_COUNT 10 |
Definition at line 135 of file mysql_priv.h.
| #define OPTION_AUTO_IS_NULL (LL(1) << 14) |
Definition at line 290 of file mysql_priv.h.
Referenced by init_event_thread(), mysql_init_variables(), and remove_eq_conds().
| #define OPTION_BEGIN (LL(1) << 20) |
Definition at line 296 of file mysql_priv.h.
Referenced by begin_trans(), binlog_commit(), binlog_rollback(), end_active_trans(), end_trans(), mysql_execute_command(), mysql_reset_thd_for_next_command(), mysql_truncate(), set_option_autocommit(), and MYSQL_BIN_LOG::write().
| #define OPTION_BIG_SELECTS (LL(1) << 9) |
Definition at line 285 of file mysql_priv.h.
Referenced by fix_max_join_size(), handle_bootstrap(), handle_one_connection(), and JOIN::optimize().
| #define OPTION_BIG_TABLES (LL(1) << 8) |
Definition at line 284 of file mysql_priv.h.
Referenced by create_myisam_tmp_table(), create_tmp_table(), and get_one_option().
| #define OPTION_BIN_LOG (LL(1) << 18) |
Definition at line 294 of file mysql_priv.h.
Referenced by sp_head::execute_function(), mysql_init_variables(), mysql_insert(), and MYSQL_BIN_LOG::write().
| #define OPTION_BUFFER_RESULT (LL(1) << 17) |
Definition at line 293 of file mysql_priv.h.
| #define OPTION_FOUND_COMMENT (LL(1) << 15) |
| #define OPTION_FOUND_ROWS (LL(1) << 5) |
Definition at line 281 of file mysql_priv.h.
Referenced by end_send(), end_send_group(), end_write(), JOIN::exec(), mysql_derived_filling(), JOIN::optimize(), remove_duplicates(), and test_if_skip_sort_order().
| #define OPTION_KEEP_LOG (LL(1) << 23) |
Definition at line 299 of file mysql_priv.h.
Referenced by binlog_rollback(), binlog_savepoint_rollback(), end_active_trans(), end_trans(), mysql_execute_command(), mysql_reset_thd_for_next_command(), and set_option_autocommit().
| #define OPTION_LOG_OFF (LL(1) << 10) |
Definition at line 286 of file mysql_priv.h.
Referenced by sp_instr_stmt::execute(), sp_head::execute_procedure(), and LOGGER::general_log_print().
| #define OPTION_NO_FOREIGN_KEY_CHECKS (LL(1) << 26) |
Definition at line 309 of file mysql_priv.h.
| #define OPTION_NOT_AUTOCOMMIT (LL(1) << 19) |
Definition at line 295 of file mysql_priv.h.
Referenced by binlog_commit(), binlog_rollback(), end_active_trans(), mysql_execute_command(), mysql_reset_thd_for_next_command(), mysql_truncate(), set_option_autocommit(), and MYSQL_BIN_LOG::write().
| #define OPTION_QUICK (LL(1) << 22) |
| #define OPTION_QUOTE_SHOW_CREATE (LL(1) << 11) |
Definition at line 287 of file mysql_priv.h.
Referenced by close_temporary_tables(), get_quote_char_for_identifier(), and mysql_init_variables().
| #define OPTION_RELAXED_UNIQUE_CHECKS (LL(1) << 27) |
Definition at line 312 of file mysql_priv.h.
| #define OPTION_SAFE_UPDATES (LL(1) << 16) |
Definition at line 292 of file mysql_priv.h.
Referenced by multi_delete_precheck(), mysql_delete(), and mysql_update().
| #define OPTION_SCHEMA_TABLE (LL(1) << 29) |
Definition at line 314 of file mysql_priv.h.
Referenced by create_sort_index(), JOIN::exec(), and mysql_schema_table().
| #define OPTION_SETUP_TABLES_DONE (LL(1) << 30) |
Definition at line 316 of file mysql_priv.h.
Referenced by mysql_execute_command(), mysql_multi_update(), mysql_test_insert_select(), mysql_test_multidelete(), mysql_test_multiupdate(), and JOIN::prepare().
| #define OPTION_SQL_NOTES (LL(1) << 31) |
Definition at line 318 of file mysql_priv.h.
Referenced by mysql_init_variables(), and push_warning().
| #define OPTION_STATUS_NO_TRANS_UPDATE (LL(1) << 25) |
Definition at line 305 of file mysql_priv.h.
Referenced by binlog_rollback(), binlog_savepoint_rollback(), end_active_trans(), end_trans(), ha_rollback_trans(), mysql_delete(), mysql_execute_command(), mysql_insert(), mysql_load(), mysql_reset_thd_for_next_command(), and set_option_autocommit().
| #define OPTION_TABLE_LOCK (LL(1) << 21) |
Definition at line 297 of file mysql_priv.h.
Referenced by close_thread_tables(), end_active_trans(), lock_tables(), and mysql_execute_command().
| #define OPTION_TO_QUERY_CACHE (LL(1) << 6) |
| #define OPTION_WARNINGS (LL(1) << 13) |
| #define portable_sizeof_char_ptr 8 |
Definition at line 424 of file mysql_priv.h.
Referenced by calc_pack_length(), create_field::create_field(), create_table_from_items(), make_empty_rec(), open_binary_frm(), and prepare_create_field().
| #define PRECISION_FOR_DOUBLE 53 |
| #define PRECISION_FOR_FLOAT 24 |
| #define PROCESS_LIST_INFO_WIDTH 65535 |
| #define PROCESS_LIST_WIDTH 100 |
| #define QUERY_ALLOC_BLOCK_SIZE 8192 |
Definition at line 139 of file mysql_priv.h.
| #define QUERY_ALLOC_PREALLOC_SIZE 8192 |
Definition at line 140 of file mysql_priv.h.
| #define QUERY_LOG_GENERAL 2 |
Definition at line 1421 of file mysql_priv.h.
Referenced by LOGGER::activate_log_handler(), Log_to_csv_event_handler::cleanup(), Log_to_csv_event_handler::close_log_table(), LOGGER::deactivate_log_handler(), Log_to_csv_event_handler::flush(), Log_to_csv_event_handler::init(), mysql_truncate(), Log_to_csv_event_handler::open_log_table(), open_table_def(), sys_default_general_log_path(), sys_update_general_log_path(), sys_var_log_state::update(), and update_sys_var_str_path().
| #define QUERY_LOG_SLOW 1 |
Definition at line 1420 of file mysql_priv.h.
Referenced by LOGGER::activate_log_handler(), Log_to_csv_event_handler::cleanup(), Log_to_csv_event_handler::close_log_table(), LOGGER::deactivate_log_handler(), Log_to_csv_event_handler::flush(), Log_to_csv_event_handler::init(), mysql_truncate(), Log_to_csv_event_handler::open_log_table(), open_table_def(), sys_default_slow_log_path(), sys_update_slow_log_path(), and update_sys_var_str_path().
| #define QUERY_PRIOR 6 |
Definition at line 239 of file mysql_priv.h.
Referenced by dispatch_command(), mysql_stmt_execute(), mysql_stmt_fetch(), and mysql_stmt_prepare().
| #define RAID_BLOCK_SIZE 1024 |
Definition at line 377 of file mysql_priv.h.
| #define RANGE_ALLOC_BLOCK_SIZE 2048 |
Definition at line 143 of file mysql_priv.h.
Definition at line 88 of file mysql_priv.h.
Referenced by MYSQL_BIN_LOG::close(), MYSQL_LOG::close(), MYSQL_BIN_LOG::open(), and MYSQL_LOG::open().
| #define SELECT_ALL (LL(1) << 24) |
Definition at line 302 of file mysql_priv.h.
| #define SELECT_BIG_RESULT (LL(1) << 4) |
Definition at line 280 of file mysql_priv.h.
| #define SELECT_DESCRIBE (LL(1) << 2) |
Definition at line 278 of file mysql_priv.h.
Referenced by JOIN::optimize(), and reinit_stmt_before_use().
| #define SELECT_DISTINCT (LL(1) << 0) |
| #define SELECT_NO_JOIN_CACHE (LL(1) << 7) |
Definition at line 283 of file mysql_priv.h.
Referenced by make_join_readinfo(), mysql_execute_command(), and mysql_multi_update().
| #define SELECT_NO_UNLOCK (LL(1) << 28) |
Definition at line 313 of file mysql_priv.h.
Referenced by JOIN::join_free(), mysql_derived_filling(), mysql_execute_command(), mysql_explain_union(), mysql_multi_update(), mysql_union(), JOIN::optimize(), subselect_union_engine::prepare(), and subselect_single_select_engine::prepare().
| #define SELECT_SMALL_RESULT (LL(1) << 3) |
Definition at line 279 of file mysql_priv.h.
Referenced by create_myisam_tmp_table(), and create_tmp_table().
| #define SELECT_STRAIGHT_JOIN (LL(1) << 1) |
| #define SHOW_LOG_STATUS_FREE "FREE" |
Definition at line 410 of file mysql_priv.h.
| #define SHOW_LOG_STATUS_INUSE "IN USE" |
Definition at line 411 of file mysql_priv.h.
| #define STACK_BUFF_ALLOC 256 |
| #define STACK_MIN_SIZE 8192 |
Definition at line 131 of file mysql_priv.h.
Referenced by sp_head::execute(), Item_subselect::fix_fields(), Item_func::fix_fields(), Item_cond::fix_fields(), Item_func_case::fix_fields(), and st_table_list::setup_underlying().
| #define STACK_MIN_SIZE_FOR_OPEN 1024*80 |
| #define STRING_BUFFER_USUAL_SIZE 80 |
Definition at line 434 of file mysql_priv.h.
Referenced by ha_myisam::assign_to_keycache(), sys_var_thd_storage_engine::check(), sys_var_character_set::check(), sys_var_collation::check(), sys_var_thd_date_time_format::check(), sys_var::check_enum(), sys_var::check_set(), cmp_item_sort_string::cmp(), Event_scheduler::dump_internal_status(), evex_print_warnings(), sp_head::execute_function(), make_date_time(), Item_param::print(), sp_get_item_value(), Event_scheduler::stop_all_running_events(), Field_set::store(), Field_enum::store(), Field_blob::store(), Field_varstring::store(), Field_string::store(), Field_decimal::store(), str2my_decimal(), and subst_spvars().
| #define TABLE_ALLOC_BLOCK_SIZE 1024 |
Definition at line 146 of file mysql_priv.h.
Referenced by alloc_table_share(), create_tmp_table(), execute_ddl_log_action(), init_tmp_table_share(), and open_table_from_share().
| #define TEMP_POOL_SIZE 128 |
Definition at line 137 of file mysql_priv.h.
| #define TEST_BLOCKING 8 |
Definition at line 246 of file mysql_priv.h.
Referenced by handle_connections_sockets(), and my_net_init().
| #define TEST_CORE_ON_SIGNAL 256 |
Definition at line 251 of file mysql_priv.h.
Referenced by get_one_option(), get_options(), handle_segfault(), and init_signals().
| #define TEST_KEEP_TMP_TABLES 16 |
| #define TEST_MIT_THREAD 4 |
Definition at line 245 of file mysql_priv.h.
| #define TEST_NO_EXTRA 128 |
Definition at line 250 of file mysql_priv.h.
| #define TEST_NO_KEY_GROUP 2 |
Definition at line 244 of file mysql_priv.h.
| #define TEST_NO_STACKTRACE 512 |
Definition at line 252 of file mysql_priv.h.
Referenced by get_one_option(), get_options(), handle_segfault(), and init_signals().
| #define TEST_NO_THREADS 32 |
Definition at line 248 of file mysql_priv.h.
Referenced by create_new_thread(), end_thread(), get_one_option(), and handle_one_connection().
| #define TEST_PRINT_CACHED_TABLES 1 |
Definition at line 243 of file mysql_priv.h.
| #define TEST_READCHECK 64 |
Definition at line 249 of file mysql_priv.h.
| #define TEST_SIGINT 1024 |
Definition at line 253 of file mysql_priv.h.
Referenced by get_options(), init_signals(), and signal_hand().
| #define TEST_SYNCHRONIZATION 2048 |
Definition at line 254 of file mysql_priv.h.
| #define TIME_FOR_COMPARE 5 |
Definition at line 164 of file mysql_priv.h.
Referenced by best_access_path(), best_extension_by_limited_search(), cost_group_min_max(), find_best(), get_best_disjunct_quick(), get_key_scans_params(), optimize_straight_join(), and SQL_SELECT::test_quick_select().
| #define TIME_FOR_COMPARE_ROWID (TIME_FOR_COMPARE*2) |
Definition at line 170 of file mysql_priv.h.
Referenced by get_best_covering_ror_intersect(), get_best_disjunct_quick(), get_merge_buffers_cost(), and ror_intersect_add().
| #define TIMESTAMP_MAX_VALUE 2145916799 |
| #define TIMESTAMP_MAX_YEAR 2038 |
| #define TIMESTAMP_MIN_VALUE 1 |
| #define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1) |
| #define TL_OPTION_FORCE_INDEX 2 |
Definition at line 419 of file mysql_priv.h.
| #define TL_OPTION_IGNORE_LEAVES 4 |
Definition at line 420 of file mysql_priv.h.
| #define TL_OPTION_UPDATING 1 |
| #define tmp_file_prefix "#sql" |
Definition at line 426 of file mysql_priv.h.
Referenced by build_tmptable_filename(), create_tmp_table(), filename_to_tablename(), find_files(), ha_discover(), mysql_alter_table(), and mysql_rm_tmp_tables().
| #define tmp_file_prefix_length 4 |
Definition at line 427 of file mysql_priv.h.
Referenced by build_tmptable_filename(), filename_to_tablename(), and mysql_rm_tmp_tables().
| #define TMP_TABLE_ALL_COLUMNS (LL(1) << 12) |
Definition at line 288 of file mysql_priv.h.
Referenced by create_tmp_table(), mysql_derived_prepare(), and Select_materialize::send_fields().
| #define TMP_TABLE_FORCE_MYISAM (LL(1) << 32) |
| #define TRANS_ALLOC_BLOCK_SIZE 4096 |
Definition at line 141 of file mysql_priv.h.
| #define TRANS_ALLOC_PREALLOC_SIZE 4096 |
Definition at line 142 of file mysql_priv.h.
| #define UDF_ALLOC_BLOCK_SIZE 1024 |
Definition at line 145 of file mysql_priv.h.
| #define UNCACHEABLE_DEPENDENT 1 |
Definition at line 382 of file mysql_priv.h.
Referenced by mysql_explain_union(), Item_in_subselect::row_value_transformer(), Item_in_subselect::single_value_transformer(), and subselect_uniquesubquery_engine::uncacheable().
| #define UNCACHEABLE_EXPLAIN 8 |
Definition at line 386 of file mysql_priv.h.
Referenced by mysql_explain_union(), and mysql_handle_derived().
| #define UNCACHEABLE_PREPARE 16 |
Definition at line 388 of file mysql_priv.h.
Referenced by init_stmt_after_parse(), and mysql_new_select().
| #define UNCACHEABLE_RAND 2 |
| #define UNCACHEABLE_SIDEEFFECT 4 |
Definition at line 384 of file mysql_priv.h.
Referenced by create_func_get_lock(), create_func_is_free_lock(), create_func_is_used_lock(), create_func_release_lock(), create_func_sleep(), create_load_file(), get_system_var(), and Item_func_last_insert_id::val_int().
| #define USER_VARS_HASH_SIZE 16 |
Definition at line 130 of file mysql_priv.h.
| #define WAIT_PRIOR 8 |
Definition at line 238 of file mysql_priv.h.
Referenced by dispatch_command(), init_thread_environment(), mysql_stmt_execute(), mysql_stmt_fetch(), and mysql_stmt_prepare().
| #define WARN_ALLOC_BLOCK_SIZE 2048 |
Definition at line 148 of file mysql_priv.h.
| #define WARN_ALLOC_PREALLOC_SIZE 1024 |
Definition at line 149 of file mysql_priv.h.
| #define WARN_DEPRECATED | ( | Thd, | |||
| Ver, | |||||
| Old, | |||||
| New | ) |
Value:
do { \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) >= 0); \ push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \ (Old), (Ver), (New)); \ } while(0)
Definition at line 92 of file mysql_priv.h.
Referenced by add_field_to_list(), sys_var_trust_routine_creators::warn_deprecated(), and sys_var_thd_table_type::warn_deprecated().
| #define WEEK_FIRST_WEEKDAY 4 |
Definition at line 432 of file mysql_priv.h.
Referenced by calc_week(), make_date_time(), and week_mode().
| #define WEEK_MONDAY_FIRST 1 |
Definition at line 430 of file mysql_priv.h.
Referenced by calc_week(), make_date_time(), and week_mode().
| #define WEEK_YEAR 2 |
Definition at line 431 of file mysql_priv.h.
Referenced by calc_week(), make_date_time(), and Item_func_yearweek::val_int().
Definition at line 87 of file mysql_priv.h.
Referenced by check_connection(), clean_up(), st_join_table::cleanup(), dispatch_command(), filesort(), get_form_pos(), init_errmessage(), mysql_change_db(), read_string(), read_texts(), delayed_insert::~delayed_insert(), delayed_row::~delayed_row(), and QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT().
| #define YY_PART_YEAR 70 |
Definition at line 203 of file mysql_priv.h.
Referenced by calc_daynr(), convert_month_to_period(), convert_period_to_month(), extract_date_time(), number_to_datetime(), Field_year::store(), str_to_datetime(), and Field_timestamp::val_str().
Definition at line 42 of file mysql_priv.h.
| typedef ulong key_part_map |
Definition at line 46 of file mysql_priv.h.
| typedef struct my_locale_st MY_LOCALE |
| typedef ulonglong nested_join_map |
Definition at line 53 of file mysql_priv.h.
| typedef ulong nesting_map |
Definition at line 47 of file mysql_priv.h.
| typedef my_bool(*) qc_engine_callback(THD *thd, char *table_key, uint key_length, ulonglong *engine_data) |
Definition at line 517 of file mysql_priv.h.
| typedef ulonglong query_id_t |
Definition at line 56 of file mysql_priv.h.
| typedef struct st_sql_list SQL_LIST |
| typedef void(*) sql_print_message_func(const char *format,...) |
Definition at line 1416 of file mysql_priv.h.
Definition at line 40 of file mysql_priv.h.
Definition at line 578 of file mysql_priv.h.
00579 { 00580 ROLLBACK_RELEASE=-2, ROLLBACK=1, ROLLBACK_AND_CHAIN=7, 00581 COMMIT_RELEASE=-1, COMMIT=0, COMMIT_AND_CHAIN=6
| enum enum_parsing_place |
Definition at line 443 of file mysql_priv.h.
00444 { 00445 NO_MATTER, 00446 IN_HAVING, 00447 SELECT_LIST, 00448 IN_WHERE 00449 };
| enum enum_var_type |
| THD* _current_thd | ( | void | ) | [inline] |
Definition at line 499 of file mysql_priv.h.
References my_pthread_getspecific_ptr.
00500 { 00501 return my_pthread_getspecific_ptr(THD*,THR_THD); 00502 }
| int append_query_string | ( | CHARSET_INFO * | csinfo, | |
| String const * | from, | |||
| String * | to | |||
| ) |
Definition at line 266 of file log_event.cc.
00268 { 00269 char *beg, *ptr; 00270 uint32 const orig_len= to->length(); 00271 if (to->reserve(orig_len + from->length()*2+3)) 00272 return 1; 00273 00274 beg= to->c_ptr_quick() + to->length(); 00275 ptr= beg; 00276 if (csinfo->escape_with_backslash_is_dangerous) 00277 ptr= str_to_hex(ptr, from->ptr(), from->length()); 00278 else 00279 { 00280 *ptr++= '\''; 00281 ptr+= escape_string_for_mysql(from->charset(), ptr, 0, 00282 from->ptr(), from->length()); 00283 *ptr++='\''; 00284 } 00285 to->length(orig_len + ptr - beg); 00286 return 0; 00287 }
| bool begin_trans | ( | THD * | thd | ) |
Definition at line 170 of file sql_parse.cc.
Referenced by end_trans(), and mysql_execute_command().
00171 { 00172 int error=0; 00173 if (unlikely(thd->in_sub_stmt)) 00174 { 00175 my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0)); 00176 return 1; 00177 } 00178 if (thd->locked_tables) 00179 { 00180 thd->lock=thd->locked_tables; 00181 thd->locked_tables=0; // Will be automatically closed 00182 close_thread_tables(thd); // Free tables 00183 } 00184 if (end_active_trans(thd)) 00185 error= -1; 00186 else 00187 { 00188 LEX *lex= thd->lex; 00189 thd->options|= OPTION_BEGIN; 00190 thd->server_status|= SERVER_STATUS_IN_TRANS; 00191 if (lex->start_transaction_opt & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) 00192 error= ha_start_consistent_snapshot(thd); 00193 } 00194 return error; 00195 }
Here is the caller graph for this function:

| bool check_merge_table_access | ( | THD * | thd, | |
| char * | db, | |||
| TABLE_LIST * | table_list | |||
| ) |
Definition at line 5725 of file sql_parse.cc.
Referenced by create_table_precheck(), and mysql_execute_command().
05727 { 05728 int error=0; 05729 if (table_list) 05730 { 05731 /* Check that all tables use the current database */ 05732 TABLE_LIST *tmp; 05733 for (tmp= table_list; tmp; tmp= tmp->next_local) 05734 { 05735 if (!tmp->db || !tmp->db[0]) 05736 tmp->db=db; 05737 } 05738 error=check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL, 05739 table_list,0); 05740 } 05741 return error; 05742 }
Here is the caller graph for this function:

| bool check_one_table_access | ( | THD * | thd, | |
| ulong | privilege, | |||
| TABLE_LIST * | tables | |||
| ) |
Definition at line 5351 of file sql_parse.cc.
Referenced by delete_precheck(), insert_precheck(), mysql_execute_command(), mysql_table_dump(), and update_precheck().
05352 { 05353 if (check_single_table_access (thd,privilege,all_tables)) 05354 return 1; 05355 05356 /* Check rights on tables of subselects and implictly opened tables */ 05357 TABLE_LIST *subselects_tables; 05358 if ((subselects_tables= all_tables->next_global)) 05359 { 05360 if ((check_table_access(thd, SELECT_ACL, subselects_tables, 0))) 05361 return 1; 05362 } 05363 return 0; 05364 }
Here is the caller graph for this function:

| bool check_routine_access | ( | THD * | thd, | |
| ulong | want_access, | |||
| char * | db, | |||
| char * | name, | |||
| bool | is_proc, | |||
| bool | no_errors | |||
| ) |
Definition at line 5628 of file sql_parse.cc.
Referenced by Item_func_sp::find_and_check_access(), mysql_execute_command(), and set_routine_security_ctx().
05630 { 05631 TABLE_LIST tables[1]; 05632 05633 bzero((char *)tables, sizeof(TABLE_LIST)); 05634 tables->db= db; 05635 tables->table_name= tables->alias= name; 05636 05637 /* 05638 The following test is just a shortcut for check_access() (to avoid 05639 calculating db_access) under the assumption that it's common to 05640 give persons global right to execute all stored SP (but not 05641 necessary to create them). 05642 */ 05643 if ((thd->security_ctx->master_access & want_access) == want_access) 05644 tables->grant.privilege= want_access; 05645 else if (check_access(thd,want_access,db,&tables->grant.privilege, 05646 0, no_errors, 0)) 05647 return TRUE; 05648 05649 #ifndef NO_EMBEDDED_ACCESS_CHECKS 05650 if (grant_option) 05651 return check_grant_routine(thd, want_access, tables, is_proc, no_errors); 05652 #endif 05653 05654 return FALSE; 05655 }
Here is the caller graph for this function:

| bool check_single_table_access | ( | THD * | thd, | |
| ulong | privilege, | |||
| TABLE_LIST * | tables | |||
| ) |
Definition at line 5303 of file sql_parse.cc.
Referenced by check_one_table_access(), and setup_tables_and_check_access().
05305 { 05306 Security_context * backup_ctx= thd->security_ctx; 05307 05308 /* we need to switch to the saved context (if any) */ 05309 if (all_tables->security_ctx) 05310 thd->security_ctx= all_tables->security_ctx; 05311 05312 const char *db_name; 05313 if ((all_tables->view || all_tables->field_translation) && 05314 !all_tables->schema_table) 05315 db_name= all_tables->view_db.str; 05316 else 05317 db_name= all_tables->db; 05318 05319 if (check_access(thd, privilege, db_name, 05320 &all_tables->grant.privilege, 0, 0, 05321 test(all_tables->schema_table))) 05322 goto deny; 05323 05324 /* Show only 1 table for check_grant */ 05325 if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, 0)) 05326 goto deny; 05327 05328 thd->security_ctx= backup_ctx; 05329 return 0; 05330 05331 deny: 05332 thd->security_ctx= backup_ctx; 05333 return 1; 05334 }
Here is the caller graph for this function:

| bool check_some_access | ( | THD * | thd, | |
| ulong | want_access, | |||
| TABLE_LIST * | table | |||
| ) |
Definition at line 5703 of file sql_parse.cc.
Referenced by mysql_create_view().
05704 { 05705 ulong access; 05706 DBUG_ENTER("check_some_access"); 05707 05708 /* This loop will work as long as we have less than 32 privileges */ 05709 for (access= 1; access < want_access ; access<<= 1) 05710 { 05711 if (access & want_access) 05712 { 05713 if (!check_access(thd, access, table->db, 05714 &table->grant.privilege, 0, 1, 05715 test(table->schema_table)) && 05716 !grant_option || !check_grant(thd, access, table, 0, 1, 1)) 05717 DBUG_RETURN(0); 05718 } 05719 } 05720 DBUG_PRINT("exit",("no matching access rights")); 05721 DBUG_RETURN(1); 05722 }
Here is the caller graph for this function:

Definition at line 5672 of file sql_parse.cc.
Referenced by check_show_routine_access(), and store_schema_proc().
05674 { 05675 ulong save_priv; 05676 if (thd->security_ctx->master_access & SHOW_PROC_ACLS) 05677 return FALSE; 05678 /* 05679 There are no routines in information_schema db. So we can safely 05680 pass zero to last paramter of check_access function 05681 */ 05682 if (!check_access(thd, SHOW_PROC_ACLS, db, &save_priv, 0, 1, 0) || 05683 (save_priv & SHOW_PROC_ACLS)) 05684 return FALSE; 05685 return check_routine_level_acl(thd, db, name, is_proc); 05686 }
Here is the caller graph for this function:

| void cleanup_items | ( | Item * | item | ) |
Definition at line 1397 of file sql_parse.cc.
Referenced by Prepared_statement::cleanup_stmt(), sp_instr_copen::execute(), and sp_head::execute().
01398 { 01399 DBUG_ENTER("cleanup_items"); 01400 for (; item ; item=item->next) 01401 item->cleanup(); 01402 DBUG_VOID_RETURN; 01403 }
Here is the caller graph for this function:

Definition at line 982 of file sql_base.cc.
Referenced by acl_reload(), begin_trans(), change_password(), Event_scheduler::check_system_tables(), Prepared_statement::cleanup_stmt(), Log_to_csv_event_handler::close_log_table(), close_proc_table(), close_tables_for_reopen(), db_create_event(), db_create_routine(), db_drop_event(), db_drop_events_from_table(), db_drop_routine(), db_find_event(), db_update_event(), db_update_routine(), dispatch_command(), sp_head::execute_procedure(), fill_schema_events(), grant_reload(), handle_bootstrap(), Event_scheduler::load_events_from_db(), my_tz_find_with_opening_tz_tables(), my_tz_init(), mysql_admin_table(), mysql_checksum_table(), mysql_create_user(), mysql_discard_or_import_tablespace(), mysql_drop_user(), mysql_execute_command(), mysql_grant(), mysql_rename_user(), mysql_routine_grant(), mysql_table_grant(), Events::open_event_table(), open_grant_tables(), plugin_load(), sp_lex_keeper::reset_lex_and_exec_core(), sp_drop_db_routines(), unlock_locked_tables(), Event_timed::update_fields(), and delayed_insert::~delayed_insert().
00983 { 00984 bool found_old_table; 00985 prelocked_mode_type prelocked_mode= thd->prelocked_mode; 00986 DBUG_ENTER("close_thread_tables"); 00987 00988 /* 00989 We are assuming here that thd->derived_tables contains ONLY derived 00990 tables for this substatement. i.e. instead of approach which uses 00991 query_id matching for determining which of the derived tables belong 00992 to this substatement we rely on the ability of substatements to 00993 save/restore thd->derived_tables during their execution. 00994 00995 TODO: Probably even better approach is to simply associate list of 00996 derived tables with (sub-)statement instead of thread and destroy 00997 them at the end of its execution. 00998 */ 00999 if (thd->derived_tables && !skip_derived) 01000 { 01001 TABLE *table, *next; 01002 /* 01003 Close all derived tables generated in queries like 01004 SELECT * FROM (SELECT * FROM t1) 01005 */ 01006 for (table= thd->derived_tables ; table ; table= next) 01007 { 01008 next= table->next; 01009 free_tmp_table(thd, table); 01010 } 01011 thd->derived_tables= 0; 01012 } 01013 01014 if (prelocked_mode) 01015 { 01016 /* 01017 Mark all temporary tables used by this substatement as free for reuse. 01018 */ 01019 mark_used_tables_as_free_for_reuse(thd, thd->temporary_tables); 01020 } 01021 01022 if (thd->locked_tables || prelocked_mode) 01023 { 01024 /* 01025 Let us commit transaction for statement. Since in 5.0 we only have 01026 one statement transaction and don't allow several nested statement 01027 transactions this call will do nothing if we are inside of stored 01028 function or trigger (i.e. statement transaction is already active and 01029 does not belong to statement for which we do close_thread_tables()). 01030 TODO: This should be fixed in later releases. 01031 */ 01032 ha_commit_stmt(thd); 01033 01034 /* Ensure we are calling ha_reset() for all used tables */ 01035 mark_used_tables_as_free_for_reuse(thd, thd->open_tables); 01036 01037 /* We are under simple LOCK TABLES so should not do anything else. */ 01038 if (!prelocked_mode || !thd->lex->requires_prelocking()) 01039 DBUG_VOID_RETURN; 01040 01041 /* 01042 We are in prelocked mode, so we have to leave it now with doing 01043 implicit UNLOCK TABLES if need. 01044 */ 01045 DBUG_PRINT("info",("thd->prelocked_mode= NON_PRELOCKED")); 01046 thd->prelocked_mode= NON_PRELOCKED; 01047 01048 if (prelocked_mode == PRELOCKED_UNDER_LOCK_TABLES) 01049 DBUG_VOID_RETURN; 01050 01051 thd->lock= thd->locked_tables; 01052 thd->locked_tables= 0; 01053 /* Fallthrough */ 01054 } 01055 01056 if (thd->lock) 01057 { 01058 /* 01059 For RBR we flush the pending event just before we unlock all the 01060 tables. This means that we are at the end of a topmost 01061 statement, so we ensure that the STMT_END_F flag is set on the 01062 pending event. For statements that are *inside* stored 01063 functions, the pending event will not be flushed: that will be 01064 handled either before writing a query log event (inside 01065 binlog_query()) or when preparing a pending event. 01066 */ 01067 #ifdef HAVE_ROW_BASED_REPLICATION 01068 thd->binlog_flush_pending_rows_event(TRUE); 01069 #endif /*HAVE_ROW_BASED_REPLICATION*/ 01070 mysql_unlock_tables(thd, thd->lock); 01071 thd->lock=0; 01072 } 01073 /* 01074 assume handlers auto-commit (if some doesn't - transaction handling 01075 in MySQL should be redesigned to support it; it's a big change, 01076 and it's not worth it - better to commit explicitly only writing 01077 transactions, read-only ones should better take care of themselves. 01078 saves some work in 2pc too) 01079 see also sql_parse.cc - dispatch_command() 01080 */ 01081 if (!(thd->state_flags & Open_tables_state::BACKUPS_AVAIL)) 01082 bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt)); 01083 if (!thd->active_transaction()) 01084 thd->transaction.xid_state.xid.null(); 01085 01086 /* VOID(pthread_sigmask(SIG_SETMASK,&thd->block_signals,NULL)); */ 01087 if (!lock_in_use) 01088 VOID(pthread_mutex_lock(&LOCK_open)); 01089 01090 DBUG_PRINT("info", ("thd->open_tables: %p", thd->open_tables)); 01091 01092 found_old_table= 0; 01093 while (thd->open_tables) 01094 found_old_table|= close_thread_table(thd, &thd->open_tables); 01095 thd->some_tables_deleted=0; 01096 01097 /* Free tables to hold down open files */ 01098 while (open_cache.records > table_cache_size && unused_tables) 01099 VOID(hash_delete(&open_cache,(byte*) unused_tables)); /* purecov: tested */ 01100 check_unused(); 01101 if (found_old_table) 01102 { 01103 /* Tell threads waiting for refresh that something has happened */ 01104 broadcast_refresh(); 01105 } 01106 if (!lock_in_use) 01107 VOID(pthread_mutex_unlock(&LOCK_open)); 01108 /* VOID(pthread_sigmask(SIG_SETMASK,&thd->signals,NULL)); */ 01109 01110 if (prelocked_mode == PRELOCKED) 01111 { 01112 /* 01113 If we are here then we are leaving normal prelocked mode, so it is 01114 good idea to turn off OPTION_TABLE_LOCK flag. 01115 */ 01116 DBUG_ASSERT(thd->lex->requires_prelocking()); 01117 thd->options&= ~(ulong) (OPTION_TABLE_LOCK); 01118 } 01119 01120 DBUG_VOID_RETURN; 01121 }
Here is the caller graph for this function:

| LEX_USER* create_default_definer | ( | THD * | thd | ) |
Definition at line 7760 of file sql_parse.cc.
Referenced by Table_triggers_list::create_trigger(), mysql_create_view(), and mysql_execute_command().
07761 { 07762 LEX_USER *definer; 07763 07764 if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER)))) 07765 return 0; 07766 07767 get_default_definer(thd, definer); 07768 07769 return definer; 07770 }
Here is the caller graph for this function:

| LEX_USER* create_definer | ( | THD * | thd, | |
| LEX_STRING * | user_name, | |||
| LEX_STRING * | host_name | |||
| ) |
Definition at line 7788 of file sql_parse.cc.
07789 { 07790 LEX_USER *definer; 07791 07792 /* Create and initialize. */ 07793 07794 if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER)))) 07795 return 0; 07796 07797 definer->user= *user_name; 07798 definer->host= *host_name; 07799 07800 return definer; 07801 }
| bool create_table_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables, | |||
| TABLE_LIST * | create_table | |||
| ) |
Definition at line 7632 of file sql_parse.cc.
Referenced by mysql_execute_command(), and mysql_test_create_table().
07634 { 07635 LEX *lex= thd->lex; 07636 SELECT_LEX *select_lex= &lex->select_lex; 07637 ulong want_priv; 07638 bool error= TRUE; // Error message is given 07639 DBUG_ENTER("create_table_precheck"); 07640 07641 want_priv= ((lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) ? 07642 CREATE_TMP_ACL : CREATE_ACL); 07643 lex->create_info.alias= create_table->alias; 07644 if (check_access(thd, want_priv, create_table->db, 07645 &create_table->grant.privilege, 0, 0, 07646 test(create_table->schema_table)) || 07647 check_merge_table_access(thd, create_table->db, 07648 (TABLE_LIST *) 07649 lex->create_info.merge_list.first)) 07650 goto err; 07651 if (grant_option && want_priv != CREATE_TMP_ACL && 07652 check_grant(thd, want_priv, create_table, 0, 1, 0)) 07653 goto err; 07654 07655 if (select_lex->item_list.elements) 07656 { 07657 /* Check permissions for used tables in CREATE TABLE ... SELECT */ 07658 07659 #ifdef NOT_NECESSARY_TO_CHECK_CREATE_TABLE_EXIST_WHEN_PREPARING_STATEMENT 07660 /* This code throws an ill error for CREATE TABLE t1 SELECT * FROM t1 */ 07661 /* 07662 Only do the check for PS, becasue we on execute we have to check that 07663 against the opened tables to ensure we don't use a table that is part 07664 of the view (which can only be done after the table has been opened). 07665 */ 07666 if (thd->stmt_arena->is_stmt_prepare_or_first_sp_execute()) 07667 { 07668 /* 07669 For temporary tables we don't have to check if the created table exists 07670 */ 07671 if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) && 07672 find_table_in_global_list(tables, create_table->db, 07673 create_table->table_name)) 07674 { 07675 error= FALSE; 07676 goto err; 07677 } 07678 } 07679 #endif 07680 if (tables && check_table_access(thd, SELECT_ACL, tables,0)) 07681 goto err; 07682 } 07683 error= FALSE; 07684 07685 err: 07686 DBUG_RETURN(error); 07687 }
Here is the caller graph for this function:

| bool delete_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables | |||
| ) |
Definition at line 7569 of file sql_parse.cc.
Referenced by mysql_execute_command(), and mysql_test_delete().
07570 { 07571 DBUG_ENTER("delete_precheck"); 07572 if (check_one_table_access(thd, DELETE_ACL, tables)) 07573 DBUG_RETURN(TRUE); 07574 /* Set privilege for the WHERE clause */ 07575 tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege); 07576 DBUG_RETURN(FALSE); 07577 }
Here is the caller graph for this function:

| bool end_active_trans | ( | THD * | thd | ) |
Definition at line 139 of file sql_parse.cc.
Referenced by begin_trans(), end_trans(), mysql_admin_table(), and mysql_execute_command().
00140 { 00141 int error=0; 00142 DBUG_ENTER("end_active_trans"); 00143 if (unlikely(thd->in_sub_stmt)) 00144 { 00145 my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0)); 00146 DBUG_RETURN(1); 00147 } 00148 if (thd->transaction.xid_state.xa_state != XA_NOTR) 00149 { 00150 my_error(ER_XAER_RMFAIL, MYF(0), 00151 xa_state_names[thd->transaction.xid_state.xa_state]); 00152 DBUG_RETURN(1); 00153 } 00154 if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN | 00155 OPTION_TABLE_LOCK)) 00156 { 00157 DBUG_PRINT("info",("options: 0x%lx", (ulong) thd->options)); 00158 /* Safety if one did "drop table" on locked tables */ 00159 if (!thd->locked_tables) 00160 thd->options&= ~OPTION_TABLE_LOCK; 00161 thd->server_status&= ~SERVER_STATUS_IN_TRANS; 00162 if (ha_commit(thd)) 00163 error=1; 00164 } 00165 thd->options&= ~(OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE | 00166 OPTION_KEEP_LOG); 00167 DBUG_RETURN(error); 00168 }
Here is the caller graph for this function:

| int end_trans | ( | THD * | thd, | |
| enum enum_mysql_completiontype | completion | |||
| ) |
Definition at line 1480 of file sql_parse.cc.
Referenced by ha_enable_transaction(), and mysql_execute_command().
01481 { 01482 bool do_release= 0; 01483 int res= 0; 01484 DBUG_ENTER("end_trans"); 01485 01486 if (unlikely(thd->in_sub_stmt)) 01487 { 01488 my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0)); 01489 DBUG_RETURN(1); 01490 } 01491 if (thd->transaction.xid_state.xa_state != XA_NOTR) 01492 { 01493 my_error(ER_XAER_RMFAIL, MYF(0), 01494 xa_state_names[thd->transaction.xid_state.xa_state]); 01495 DBUG_RETURN(1); 01496 } 01497 switch (completion) { 01498 case COMMIT: 01499 /* 01500 We don't use end_active_trans() here to ensure that this works 01501 even if there is a problem with the OPTION_AUTO_COMMIT flag 01502 (Which of course should never happen...) 01503 */ 01504 thd->server_status&= ~SERVER_STATUS_IN_TRANS; 01505 res= ha_commit(thd); 01506 thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE | 01507 OPTION_KEEP_LOG); 01508 break; 01509 case COMMIT_RELEASE: 01510 do_release= 1; /* fall through */ 01511 case COMMIT_AND_CHAIN: 01512 res= end_active_trans(thd); 01513 if (!res && completion == COMMIT_AND_CHAIN) 01514 res= begin_trans(thd); 01515 break; 01516 case ROLLBACK_RELEASE: 01517 do_release= 1; /* fall through */ 01518 case ROLLBACK: 01519 case ROLLBACK_AND_CHAIN: 01520 { 01521 thd->server_status&= ~SERVER_STATUS_IN_TRANS; 01522 if (ha_rollback(thd)) 01523 res= -1; 01524 thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE | 01525 OPTION_KEEP_LOG); 01526 if (!res && (completion == ROLLBACK_AND_CHAIN)) 01527 res= begin_trans(thd); 01528 break; 01529 } 01530 default: 01531 res= -1; 01532 my_error(ER_UNKNOWN_COM_ERROR, MYF(0)); 01533 DBUG_RETURN(-1); 01534 } 01535 01536 if (res < 0) 01537 my_error(thd->killed_errno(), MYF(0)); 01538 else if ((res == 0) && do_release) 01539 thd->killed= THD::KILL_CONNECTION; 01540 01541 DBUG_RETURN(res); 01542 }
Here is the caller graph for this function:

| int error_log_print | ( | enum loglevel | level, | |
| const char * | format, | |||
| va_list | args | |||
| ) |
Definition at line 3454 of file log.cc.
Referenced by sql_print_error(), sql_print_information(), and sql_print_warning().
03456 { 03457 return logger.error_log_print(level, format, args); 03458 }
Here is the caller graph for this function:

| bool fn_format_relative_to_data_home | ( | my_string | to, | |
| const char * | name, | |||
| const char * | dir, | |||
| const char * | extension | |||
| ) |
Definition at line 7849 of file mysqld.cc.
Referenced by ha_myisam::backup(), prepare_for_restore(), and ha_myisam::restore().
07851 { 07852 char tmp_path[FN_REFLEN]; 07853 if (!test_if_hard_path(dir)) 07854 { 07855 strxnmov(tmp_path,sizeof(tmp_path)-1, mysql_real_data_home, 07856 dir, NullS); 07857 dir=tmp_path; 07858 } 07859 return !fn_format(to, name, dir, extension, 07860 MY_APPEND_EXT | MY_UNPACK_FILENAME | MY_SAFE_PATH); 07861 }
Here is the caller graph for this function:

| void free_items | ( | Item * | item | ) |
Definition at line 1383 of file sql_parse.cc.
Referenced by Materialized_cursor::close(), Sensitive_cursor::close(), closefrm(), sp_head::destroy(), open_table_from_share(), Prepared_statement::~Prepared_statement(), and sp_instr::~sp_instr().
01384 { 01385 Item *next; 01386 DBUG_ENTER("free_items"); 01387 for (; item ; item=next) 01388 { 01389 next=item->next; 01390 item->delete_self(); 01391 } 01392 DBUG_VOID_RETURN; 01393 }
Here is the caller graph for this function:

| bool general_log_print | ( | THD * | thd, | |
| enum enum_server_command | command, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Definition at line 3468 of file log.cc.
Referenced by check_user(), dispatch_command(), sp_instr_stmt::execute(), mysql_change_db(), mysql_stmt_execute(), mysql_stmt_prepare(), and mysqld_show_create_db().
03470 { 03471 va_list args; 03472 uint error= 0; 03473 03474 va_start(args, format); 03475 error= logger.general_log_print(thd, command, format, args); 03476 va_end(args); 03477 03478 return error; 03479 }
Here is the caller graph for this function:

Definition at line 7818 of file sql_parse.cc.
Referenced by mysql_create_user(), mysql_drop_user(), mysql_execute_command(), mysql_grant(), mysql_rename_user(), mysql_revoke_all(), mysql_routine_grant(), and mysql_table_grant().
07819 { 07820 LEX_USER *curr_user; 07821 if (!user->user.str) // current_user 07822 { 07823 if (!(curr_user= (LEX_USER*) thd->alloc(sizeof(LEX_USER)))) 07824 { 07825 my_error(ER_OUTOFMEMORY, MYF(0), sizeof(LEX_USER)); 07826 return 0; 07827 } 07828 get_default_definer(thd, curr_user); 07829 return curr_user; 07830 } 07831 return user; 07832 }
Here is the caller graph for this function:

| void get_default_definer | ( | THD * | thd, | |
| LEX_USER * | definer | |||
| ) |
Definition at line 7735 of file sql_parse.cc.
Referenced by create_default_definer(), get_current_user(), and mysql_make_view().
07736 { 07737 const Security_context *sctx= thd->security_ctx; 07738 07739 definer->user.str= (char *) sctx->priv_user; 07740 definer->user.length= strlen(definer->user.str); 07741 07742 definer->host.str= (char *) sctx->priv_host; 07743 definer->host.length= strlen(definer->host.str); 07744 }
Here is the caller graph for this function:

Definition at line 32 of file thr_malloc.cc.
Referenced by acl_load(), alloc_table_share(), create_tmp_table(), execute_ddl_log_action(), sp_head::execute_function(), sp_head::execute_trigger(), grant_load(), init_tmp_table_share(), open_table_from_share(), plugin_load(), Sensitive_cursor::post_open(), QUICK_GROUP_MIN_MAX_SELECT::QUICK_GROUP_MIN_MAX_SELECT(), QUICK_INDEX_MERGE_SELECT::QUICK_INDEX_MERGE_SELECT(), QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(), QUICK_ROR_INTERSECT_SELECT::QUICK_ROR_INTERSECT_SELECT(), QUICK_ROR_UNION_SELECT::QUICK_ROR_UNION_SELECT(), Sensitive_cursor::Sensitive_cursor(), and SQL_SELECT::test_quick_select().
00033 { 00034 init_alloc_root(mem_root, block_size, pre_alloc); 00035 mem_root->error_handler=sql_alloc_error_handler; 00036 }
Here is the caller graph for this function:

| bool insert_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables | |||
| ) |
Definition at line 7593 of file sql_parse.cc.
Referenced by mysql_execute_command(), mysql_test_insert(), and mysql_test_insert_select().
07594 { 07595 LEX *lex= thd->lex; 07596 DBUG_ENTER("insert_precheck"); 07597 07598 /* 07599 Check that we have modify privileges for the first table and 07600 select privileges for the rest 07601 */ 07602 ulong privilege= (INSERT_ACL | 07603 (lex->duplicates == DUP_REPLACE ? DELETE_ACL : 0) | 07604 (lex->value_list.elements ? UPDATE_ACL : 0)); 07605 07606 if (check_one_table_access(thd, privilege, tables)) 07607 DBUG_RETURN(TRUE); 07608 07609 if (lex->update_list.elements != lex->value_list.elements) 07610 { 07611 my_message(ER_WRONG_VALUE_COUNT, ER(ER_WRONG_VALUE_COUNT), MYF(0)); 07612 DBUG_RETURN(TRUE); 07613 } 07614 DBUG_RETURN(FALSE); 07615 }
Here is the caller graph for this function:

Definition at line 7123 of file sql_parse.cc.
Referenced by Event_timed::kill_thread(), sql_kill(), and Event_scheduler::stop_all_running_events().
07124 { 07125 THD *tmp; 07126 uint error=ER_NO_SUCH_THREAD; 07127 DBUG_ENTER("kill_one_thread"); 07128 DBUG_PRINT("enter", ("id=%lu only_kill=%d", id, only_kill_query)); 07129 VOID(pthread_mutex_lock(&LOCK_thread_count)); // For unlink from list 07130 I_List_iterator<THD> it(threads); 07131 while ((tmp=it++)) 07132 { 07133 if (tmp->command == COM_DAEMON) 07134 continue; 07135 if (tmp->thread_id == id) 07136 { 07137 pthread_mutex_lock(&tmp->LOCK_delete); // Lock from delete 07138 break; 07139 } 07140 } 07141 VOID(pthread_mutex_unlock(&LOCK_thread_count)); 07142 if (tmp) 07143 { 07144 if ((thd->security_ctx->master_access & SUPER_ACL) || 07145 !strcmp(thd->security_ctx->user, tmp->security_ctx->user)) 07146 { 07147 tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION); 07148 error=0; 07149 } 07150 else 07151 error=ER_KILL_DENIED_ERROR; 07152 pthread_mutex_unlock(&tmp->LOCK_delete); 07153 } 07154 DBUG_PRINT("exit", ("%d", error)); 07155 DBUG_RETURN(error); 07156 }
Here is the caller graph for this function:

| bool multi_delete_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables | |||
| ) |
Definition at line 7442 of file sql_parse.cc.
Referenced by mysql_execute_command(), and mysql_test_multidelete().
07443 { 07444 SELECT_LEX *select_lex= &thd->lex->select_lex; 07445 TABLE_LIST *aux_tables= 07446 (TABLE_LIST *)thd->lex->auxiliary_table_list.first; 07447 TABLE_LIST **save_query_tables_own_last= thd->lex->query_tables_own_last; 07448 DBUG_ENTER("multi_delete_precheck"); 07449 07450 /* sql_yacc guarantees that tables and aux_tables are not zero */ 07451 DBUG_ASSERT(aux_tables != 0); 07452 if (check_table_access(thd, SELECT_ACL, tables, 0)) 07453 DBUG_RETURN(TRUE); 07454 07455 /* 07456 Since aux_tables list is not part of LEX::query_tables list we 07457 have to juggle with LEX::query_tables_own_last value to be able 07458 call check_table_access() safely. 07459 */ 07460 thd->lex->query_tables_own_last= 0; 07461 if (check_table_access(thd, DELETE_ACL, aux_tables, 0)) 07462 { 07463 thd->lex->query_tables_own_last= save_query_tables_own_last; 07464 DBUG_RETURN(TRUE); 07465 } 07466 thd->lex->query_tables_own_last= save_query_tables_own_last; 07467 07468 if ((thd->options & OPTION_SAFE_UPDATES) && !select_lex->where) 07469 { 07470 my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, 07471 ER(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE), MYF(0)); 07472 DBUG_RETURN(TRUE); 07473 } 07474 DBUG_RETURN(FALSE); 07475 }
Here is the caller graph for this function:

| bool multi_update_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables | |||
| ) |
Definition at line 7362 of file sql_parse.cc.
Referenced by mysql_execute_command(), and mysql_test_multiupdate().
07363 { 07364 const char *msg= 0; 07365 TABLE_LIST *table; 07366 LEX *lex= thd->lex; 07367 SELECT_LEX *select_lex= &lex->select_lex; 07368 DBUG_ENTER("multi_update_precheck"); 07369 07370 if (select_lex->item_list.elements != lex->value_list.elements) 07371 { 07372 my_message(ER_WRONG_VALUE_COUNT, ER(ER_WRONG_VALUE_COUNT), MYF(0)); 07373 DBUG_RETURN(TRUE); 07374 } 07375 /* 07376 Ensure that we have UPDATE or SELECT privilege for each table 07377 The exact privilege is checked in mysql_multi_update() 07378 */ 07379 for (table= tables; table; table= table->next_local) 07380 { 07381 if (table->derived) 07382 table->grant.privilege= SELECT_ACL; 07383 else if ((check_access(thd, UPDATE_ACL, table->db, 07384 &table->grant.privilege, 0, 1, 07385 test(table->schema_table)) || 07386 grant_option && 07387 check_grant(thd, UPDATE_ACL, table, 0, 1, 1)) && 07388 (check_access(thd, SELECT_ACL, table->db, 07389 &table->grant.privilege, 0, 0, 07390 test(table->schema_table)) || 07391 grant_option && check_grant(thd, SELECT_ACL, table, 0, 1, 0))) 07392 DBUG_RETURN(TRUE); 07393 07394 table->table_in_first_from_clause= 1; 07395 } 07396 /* 07397 Is there tables of subqueries? 07398 */ 07399 if (&lex->select_lex != lex->all_selects_list || lex->time_zone_tables_used) 07400 { 07401 DBUG_PRINT("info",("Checking sub query list")); 07402 for (table= tables; table; table= table->next_global) 07403 { 07404 if (!my_tz_check_n_skip_implicit_tables(&table, 07405 lex->time_zone_tables_used) && 07406 !table->table_in_first_from_clause) 07407 { 07408 if (check_access(thd, SELECT_ACL, table->db, 07409 &table->grant.privilege, 0, 0, 07410 test(table->schema_table)) || 07411 grant_option && check_grant(thd, SELECT_ACL, table, 0, 1, 0)) 07412 DBUG_RETURN(TRUE); 07413 } 07414 } 07415 } 07416 07417 if (select_lex->order_list.elements) 07418 msg= "ORDER BY"; 07419 else if (select_lex->select_limit) 07420 msg= "LIMIT"; 07421 if (msg) 07422 { 07423 my_error(ER_WRONG_USAGE, MYF(0), "UPDATE", msg); 07424 DBUG_RETURN(TRUE); 07425 } 07426 DBUG_RETURN(FALSE); 07427 }
Here is the caller graph for this function:

| MY_LOCALE* my_locale_by_name | ( | const char * | name | ) |
Definition at line 27 of file sql_locale.cc.
Referenced by sys_var_thd_lc_time_names::check().
00028 { 00029 MY_LOCALE **locale; 00030 for( locale= my_locales; *locale != NULL; locale++) 00031 { 00032 if(!strcmp((*locale)->name, name)) 00033 return *locale; 00034 } 00035 return NULL; 00036 }
Here is the caller graph for this function:

| bool mysql_insert_select_prepare | ( | THD * | thd | ) |
Definition at line 2273 of file sql_insert.cc.
Referenced by mysql_execute_command(), and mysql_insert_select_prepare_tester().
02274 { 02275 LEX *lex= thd->lex; 02276 SELECT_LEX *select_lex= &lex->select_lex; 02277 TABLE_LIST *first_select_leaf_table; 02278 DBUG_ENTER("mysql_insert_select_prepare"); 02279 02280 /* 02281 SELECT_LEX do not belong to INSERT statement, so we can't add WHERE 02282 clause if table is VIEW 02283 */ 02284 02285 if (mysql_prepare_insert(thd, lex->query_tables, 02286 lex->query_tables->table, lex->field_list, 0, 02287 lex->update_list, lex->value_list, 02288 lex->duplicates, 02289 &select_lex->where, TRUE)) 02290 DBUG_RETURN(TRUE); 02291 02292 /* 02293 exclude first table from leaf tables list, because it belong to 02294 INSERT 02295 */ 02296 DBUG_ASSERT(select_lex->leaf_tables != 0); 02297 lex->leaf_tables_insert= select_lex->leaf_tables; 02298 /* skip all leaf tables belonged to view where we are insert */ 02299 for (first_select_leaf_table= select_lex->leaf_tables->next_leaf; 02300 first_select_leaf_table && 02301 first_select_leaf_table->belong_to_view && 02302 first_select_leaf_table->belong_to_view == 02303 lex->leaf_tables_insert->belong_to_view; 02304 first_select_leaf_table= first_select_leaf_table->next_leaf) 02305 {} 02306 select_lex->leaf_tables= first_select_leaf_table; 02307 DBUG_RETURN(FALSE); 02308 }
Here is the caller graph for this function:

| bool mysql_multi_delete_prepare | ( | THD * | thd | ) |
Definition at line 435 of file sql_delete.cc.
Referenced by mysql_execute_command(), and mysql_test_multidelete().
00436 { 00437 LEX *lex= thd->lex; 00438 TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxiliary_table_list.first; 00439 TABLE_LIST *target_tbl; 00440 DBUG_ENTER("mysql_multi_delete_prepare"); 00441 00442 /* 00443 setup_tables() need for VIEWs. JOIN::prepare() will not do it second 00444 time. 00445 00446 lex->query_tables also point on local list of DELETE SELECT_LEX 00447 */ 00448 if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context, 00449 &thd->lex->select_lex.top_join_list, 00450 lex->query_tables, 00451 &lex->select_lex.leaf_tables, FALSE, 00452 DELETE_ACL)) 00453 DBUG_RETURN(TRUE); 00454 00455 00456 /* 00457 Multi-delete can't be constructed over-union => we always have 00458 single SELECT on top and have to check underlying SELECTs of it 00459 */ 00460 lex->select_lex.exclude_from_table_unique_test= TRUE; 00461 /* Fix tables-to-be-deleted-from list to point at opened tables */ 00462 for (target_tbl= (TABLE_LIST*) aux_tables; 00463 target_tbl; 00464 target_tbl= target_tbl->next_local) 00465 { 00466 if (!(target_tbl->table= target_tbl->correspondent_table->table)) 00467 { 00468 DBUG_ASSERT(target_tbl->correspondent_table->view && 00469 target_tbl->correspondent_table->merge_underlying_list && 00470 target_tbl->correspondent_table->merge_underlying_list-> 00471 next_local); 00472 my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0), 00473 target_tbl->correspondent_table->view_db.str, 00474 target_tbl->correspondent_table->view_name.str); 00475 DBUG_RETURN(TRUE); 00476 } 00477 00478 if (!target_tbl->correspondent_table->updatable || 00479 check_key_in_view(thd, target_tbl->correspondent_table)) 00480 { 00481 my_error(ER_NON_UPDATABLE_TABLE, MYF(0), 00482 target_tbl->table_name, "DELETE"); 00483 DBUG_RETURN(TRUE); 00484 } 00485 /* 00486 Check that table from which we delete is not used somewhere 00487 inside subqueries/view. 00488 */ 00489 { 00490 TABLE_LIST *duplicate; 00491 if ((duplicate= unique_table(thd, target_tbl->correspondent_table, 00492 lex->query_tables))) 00493 { 00494 update_non_unique_table_error(target_tbl->correspondent_table, 00495 "DELETE", duplicate); 00496 DBUG_RETURN(TRUE); 00497 } 00498 } 00499 } 00500 DBUG_RETURN(FALSE); 00501 }
Here is the caller graph for this function:

| bool mysql_multi_update_prepare | ( | THD * | thd | ) |
Definition at line 805 of file sql_update.cc.
Referenced by mysql_execute_command(), and mysql_test_multiupdate().
00806 { 00807 LEX *lex= thd->lex; 00808 TABLE_LIST *table_list= lex->query_tables; 00809 TABLE_LIST *tl, *leaves; 00810 List<Item> *fields= &lex->select_lex.item_list; 00811 table_map tables_for_update; 00812 bool update_view= 0; 00813 /* 00814 if this multi-update was converted from usual update, here is table 00815 counter else junk will be assigned here, but then replaced with real 00816 count in open_tables() 00817 */ 00818 uint table_count= lex->table_count; 00819 const bool using_lock_tables= thd->locked_tables != 0; 00820 bool original_multiupdate= (thd->lex->sql_command == SQLCOM_UPDATE_MULTI); 00821 bool need_reopen= FALSE; 00822 DBUG_ENTER("mysql_multi_update_prepare"); 00823 00824 /* following need for prepared statements, to run next time multi-update */ 00825 thd->lex->sql_command= SQLCOM_UPDATE_MULTI; 00826 00827 reopen_tables: 00828 00829 /* open tables and create derived ones, but do not lock and fill them */ 00830 if (((original_multiupdate || need_reopen) && 00831 open_tables(thd, &table_list, &table_count, 0)) || 00832 mysql_handle_derived(lex, &mysql_derived_prepare)) 00833 DBUG_RETURN(TRUE); 00834 /* 00835 setup_tables() need for VIEWs. JOIN::prepare() will call setup_tables() 00836 second time, but this call will do nothing (there are check for second 00837 call in setup_tables()). 00838 */ 00839 00840 if (setup_tables_and_check_access(thd, &lex->select_lex.context, 00841 &lex->select_lex.top_join_list, 00842 table_list, 00843 &lex->select_lex.leaf_tables, FALSE, 00844 UPDATE_ACL)) 00845 DBUG_RETURN(TRUE); 00846 00847 if (setup_fields_with_no_wrap(thd, 0, *fields, MARK_COLUMNS_WRITE, 0, 0)) 00848 DBUG_RETURN(TRUE); 00849 00850 for (tl= table_list; tl ; tl= tl->next_local) 00851 { 00852 if (tl->view) 00853 { 00854 update_view= 1; 00855 break; 00856 } 00857 } 00858 00859 if (update_view && check_fields(thd, *fields)) 00860 { 00861 DBUG_RETURN(TRUE); 00862 } 00863 00864 tables_for_update= get_table_map(fields); 00865 00866 /* 00867 Setup timestamp handling and locking mode 00868 */ 00869 leaves= lex->select_lex.leaf_tables; 00870 for (tl= leaves; tl; tl= tl->next_leaf) 00871 { 00872 TABLE *table= tl->table; 00873 /* Only set timestamp column if this is not modified */ 00874 if (table->timestamp_field && 00875 bitmap_is_set(table->write_set, 00876 table->timestamp_field->field_index)) 00877 table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; 00878 00879 /* if table will be updated then check that it is unique */ 00880 if (table->map & tables_for_update) 00881 { 00882 if (!tl->updatable || check_key_in_view(thd, tl)) 00883 { 00884 my_error(ER_NON_UPDATABLE_TABLE, MYF(0), tl->alias, "UPDATE"); 00885 DBUG_RETURN(TRUE); 00886 } 00887 00888 table->mark_columns_needed_for_update(); 00889 DBUG_PRINT("info",("setting table `%s` for update", tl->alias)); 00890 /* 00891 If table will be updated we should not downgrade lock for it and 00892 leave it as is. 00893 */ 00894 } 00895 else 00896 { 00897 DBUG_PRINT("info",("setting table `%s` for read-only", tl->alias)); 00898 /* 00899 If we are using the binary log, we need TL_READ_NO_INSERT to get 00900 correct order of statements. Otherwise, we use a TL_READ lock to 00901 improve performance. 00902 */ 00903 tl->lock_type= using_update_log ? TL_READ_NO_INSERT : TL_READ; 00904 tl->updating= 0; 00905 /* Update TABLE::lock_type accordingly. */ 00906 if (!tl->placeholder() && !tl->schema_table && !using_lock_tables) 00907 tl->table->reginfo.lock_type= tl->lock_type; 00908 } 00909 } 00910 for (tl= table_list; tl; tl= tl->next_local) 00911 { 00912 /* Check access privileges for table */ 00913 if (!tl->derived) 00914 { 00915 uint want_privilege= tl->updating ? UPDATE_ACL : SELECT_ACL; 00916 if (check_access(thd, want_privilege, 00917 tl->db, &tl->grant.privilege, 0, 0, 00918 test(tl->schema_table)) || 00919 (grant_option && check_grant(thd, want_privilege, tl, 0, 1, 0))) 00920 DBUG_RETURN(TRUE); 00921 } 00922 } 00923 00924 /* check single table update for view compound from several tables */ 00925 for (tl= table_list; tl; tl= tl->next_local) 00926 { 00927 if (tl->effective_algorithm == VIEW_ALGORITHM_MERGE) 00928 { 00929 TABLE_LIST *for_update= 0; 00930 if (tl->check_single_table(&for_update, tables_for_update, tl)) 00931 { 00932 my_error(ER_VIEW_MULTIUPDATE, MYF(0), 00933 tl->view_db.str, tl->view_name.str); 00934 DBUG_RETURN(-1); 00935 } 00936 } 00937 } 00938 00939 /* now lock and fill tables */ 00940 if (lock_tables(thd, table_list, table_count, &need_reopen)) 00941 { 00942 if (!need_reopen) 00943 DBUG_RETURN(TRUE); 00944 00945 /* 00946 We have to reopen tables since some of them were altered or dropped 00947 during lock_tables() or something was done with their triggers. 00948 Let us do some cleanups to be able do setup_table() and setup_fields() 00949 once again. 00950 */ 00951 List_iterator_fast<Item> it(*fields); 00952 Item *item; 00953 while ((item= it++)) 00954 item->cleanup(); 00955 00956 /* We have to cleanup translation tables of views. */ 00957 for (TABLE_LIST *tbl= table_list; tbl; tbl= tbl->next_global) 00958 tbl->cleanup_items(); 00959 00960 close_tables_for_reopen(thd, &table_list); 00961 goto reopen_tables; 00962 } 00963 00964 /* 00965 Check that we are not using table that we are updating, but we should 00966 skip all tables of UPDATE SELECT itself 00967 */ 00968 lex->select_lex.exclude_from_table_unique_test= TRUE; 00969 /* We only need SELECT privilege for columns in the values list */ 00970 for (tl= leaves; tl; tl= tl->next_leaf) 00971 { 00972 TABLE *table= tl->table; 00973 TABLE_LIST *tlist; 00974 if (!(tlist= tl->top_table())->derived) 00975 { 00976 tlist->grant.want_privilege= 00977 (SELECT_ACL & ~tlist->grant.privilege); 00978 table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege); 00979 } 00980 DBUG_PRINT("info", ("table: %s want_privilege: %u", tl->alias, 00981 (uint) table->grant.want_privilege)); 00982 if (tl->lock_type != TL_READ && 00983 tl->lock_type != TL_READ_NO_INSERT) 00984 { 00985 TABLE_LIST *duplicate; 00986 if ((duplicate= unique_table(thd, tl, table_list))) 00987 { 00988 update_non_unique_table_error(table_list, "UPDATE", duplicate); 00989 DBUG_RETURN(TRUE); 00990 } 00991 } 00992 } 00993 /* 00994 Set exclude_from_table_unique_test value back to FALSE. It is needed for 00995 further check in multi_update::prepare whether to use record cache. 00996 */ 00997 lex->select_lex.exclude_from_table_unique_test= FALSE; 00998 00999 if (thd->fill_derived_tables() && 01000 mysql_handle_derived(lex, &mysql_derived_filling)) 01001 DBUG_RETURN(TRUE); 01002 01003 DBUG_RETURN (FALSE); 01004 }
Here is the caller graph for this function:

Definition at line 7702 of file sql_parse.cc.
07703 { 07704 Item *negated; 07705 if (expr->type() == Item::FUNC_ITEM && 07706 ((Item_func *) expr)->functype() == Item_func::NOT_FUNC) 07707 { 07708 /* it is NOT(NOT( ... )) */ 07709 Item *arg= ((Item_func *) expr)->arguments()[0]; 07710 enum_parsing_place place= thd->lex->current_select->parsing_place; 07711 if (arg->is_bool_func() || place == IN_WHERE || place == IN_HAVING) 07712 return arg; 07713 /* 07714 if it is not boolean function then we have to emulate value of 07715 not(not(a)), it will be a != 0 07716 */ 07717 return new Item_func_ne(arg, new Item_int((char*) "0", 0, 1)); 07718 } 07719 07720 if ((negated= expr->neg_transformer(thd)) != 0) 07721 return negated; 07722 return new Item_func_not(expr); 07723 }
| query_id_t next_query_id | ( | ) | [inline] |
Definition at line 60 of file mysql_priv.h.
References query_id.
Referenced by dispatch_command(), handle_bootstrap(), and sp_lex_keeper::reset_lex_and_exec_core().
00060 { return query_id++; }
Here is the caller graph for this function:

| pthread_key | ( | THD * | , | |
| THR_THD | ||||
| ) |
| char* query_table_status | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | table_name | |||
| ) |
Definition at line 3461 of file log.cc.
Referenced by log_slow_statement().
03463 { 03464 return logger.slow_log_print(thd, query, query_length, query_start_arg); 03465 }
Here is the caller graph for this function:

| gptr sql_alloc | ( | unsigned | size | ) |
| gptr sql_calloc | ( | unsigned | size | ) |
Referenced by Cached_item_field::Cached_item_field(), and Item_func_sp::Item_func_sp().
Here is the caller graph for this function:

| void sql_element_free | ( | void * | ptr | ) |
Definition at line 7169 of file sql_parse.cc.
Referenced by dispatch_command(), and mysql_execute_command().
07170 { 07171 uint error; 07172 if (!(error= kill_one_thread(thd, id, only_kill_query))) 07173 send_ok(thd); 07174 else 07175 my_error(error, MYF(0), id); 07176 }
Here is the caller graph for this function:

| gptr sql_memdup | ( | const void * | ptr, | |
| unsigned | size | |||
| ) |
| void sql_perror | ( | const char * | message | ) |
Definition at line 3831 of file log.cc.
Referenced by create_pid_file(), get_one_option(), handle_connections_sockets(), init_server_components(), main(), network_init(), set_effective_user(), set_root(), and set_user().
03832 { 03833 #ifdef HAVE_STRERROR 03834 sql_print_error("%s: %s",message, strerror(errno)); 03835 #else 03836 perror(message); 03837 #endif 03838 }
Here is the caller graph for this function:

| void sql_print_error | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 795 of file mysqlbinlog.cc.
References args.
Referenced by acl_load(), acl_reload(), check_binlog_magic(), check_master_version(), Event_scheduler::check_system_tables(), check_user(), MYSQL_BIN_LOG::close(), MYSQL_LOG::close(), close_connections(), Event_timed::compile(), db_drop_events_from_table(), deactivate_ddl_log_entry(), Event_scheduler::destroy(), Event_scheduler::drop_event(), event_scheduler_thread(), event_worker_thread(), execute_ddl_log_entry(), execute_ddl_log_recovery(), Event_scheduler::execute_top(), filename_to_tablename(), fill_schema_events(), MYSQL_LOG::generate_new_name(), get_free_ddl_log_entry(), ha_recover(), handle_connections_sockets(), delayed_insert::handle_inserts(), Event_scheduler::init(), init_common_variables(), init_ddl_log(), init_server_components(), init_thread_environment(), kill_mysql(), kill_server(), load_db_opt(), Event_scheduler::load_events_from_db(), Load_log_processor::load_old_format_file(), main(), mi_check_print_msg(), my_message_sql(), my_tz_find(), my_tz_init(), mysql_admin_table(), mysql_ha_read(), mysql_revoke_all(), network_init(), MYSQL_BIN_LOG::open(), MYSQL_LOG::open(), open_binlog(), open_unireg_entry(), plugin_add(), plugin_dl_add(), plugin_initialize(), plugin_load(), Load_log_processor::prepare_new_file_for_old_format(), Load_log_processor::process_first_event(), read_ddl_log_header(), Log_event::read_log_event(), read_texts(), reopen_table(), report_error(), LOGGER::set_handlers(), signal_hand(), Event_timed::spawn_now(), sql_alloc_error_handler(), sql_perror(), start_signal_handler(), Event_scheduler::stop_all_running_events(), sync_ddl_log(), table_check_intact(), tz_load_from_open_tables(), unireg_abort(), TC_LOG::using_heuristic_recover(), MYSQL_BIN_LOG::write(), MYSQL_QUERY_LOG::write(), write_ddl_log_entry(), write_ddl_log_header(), and write_execute_ddl_log_entry().
00796 { 00797 va_list args; 00798 va_start(args, format); 00799 fprintf(stderr, "ERROR: "); 00800 vfprintf(stderr, format, args); 00801 fprintf(stderr, "\n"); 00802 va_end(args); 00803 }
Here is the caller graph for this function:

| void sql_print_information | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 4010 of file log.cc.
Referenced by Event_scheduler::check_n_suspend_if_needed(), Event_scheduler::clean_queue(), clean_up(), event_scheduler_thread(), event_worker_thread(), Event_scheduler::execute_top(), ha_recover(), kill_server(), Event_scheduler::load_events_from_db(), main(), network_init(), ha_myisam::repair(), Event_scheduler::run(), signal_hand(), Event_timed::spawn_now(), Event_scheduler::stop(), Event_scheduler::stop_all_running_events(), TC_LOG::using_heuristic_recover(), and xarecover_handlerton().
04011 { 04012 va_list args; 04013 DBUG_ENTER("sql_print_information"); 04014 04015 va_start(args, format); 04016 error_log_print(INFORMATION_LEVEL, format, args); 04017 va_end(args); 04018 04019 DBUG_VOID_RETURN; 04020 }
Here is the caller graph for this function:

| void sql_print_warning | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 3997 of file log.cc.
Referenced by acl_load(), bootstrap(), ha_myisam::check_and_repair(), check_user(), close_connections(), create_maintenance_thread(), create_shutdown_thread(), ha_myisam::enable_indexes(), get_one_option(), get_options(), grant_load(), ha_initialize_handlerton(), ha_recover(), handle_one_connection(), init_common_variables(), init_server_components(), init_signals(), main(), my_tz_init(), network_init(), open_binary_frm(), ha_myisam::optimize(), plugin_finalize(), print_signal_warning(), rm_temporary_table(), signal_hand(), and test_if_case_insensitive().
03998 { 03999 va_list args; 04000 DBUG_ENTER("sql_print_warning"); 04001 04002 va_start(args, format); 04003 error_log_print(WARNING_LEVEL, format, args); 04004 va_end(args); 04005 04006 DBUG_VOID_RETURN; 04007 }
Here is the caller graph for this function:

| char* sql_strdup | ( | const char * | str | ) |
Definition at line 56 of file thr_malloc.cc.
Referenced by make_unique_key_name().
00057 { 00058 uint len=(uint) strlen(str)+1; 00059 char *pos; 00060 if ((pos= (char*) sql_alloc(len))) 00061 memcpy(pos,str,len); 00062 return pos; 00063 }
Here is the caller graph for this function:

| char* sql_strmake | ( | const char * | str, | |
| uint | len | |||
| ) |
Definition at line 66 of file thr_malloc.cc.
Referenced by change_to_use_tmp_fields(), create_field::create_field(), resolve_const_item(), and Item::set_name().
00067 { 00068 char *pos; 00069 if ((pos= (char*) sql_alloc(len+1))) 00070 { 00071 memcpy(pos,str,len); 00072 pos[len]=0; 00073 } 00074 return pos; 00075 }
Here is the caller graph for this function:

| char* sql_strmake_with_convert | ( | const char * | str, | |
| uint32 | arg_length, | |||
| CHARSET_INFO * | from_cs, | |||
| uint32 | max_res_length, | |||
| CHARSET_INFO * | to_cs, | |||
| uint32 * | result_length | |||
| ) |
Definition at line 91 of file thr_malloc.cc.
Referenced by Item::set_name().
00095 { 00096 char *pos; 00097 uint32 new_length= to_cs->mbmaxlen*arg_length; 00098 max_res_length--; // Reserve place for end null 00099 00100 set_if_smaller(new_length, max_res_length); 00101 if (!(pos= sql_alloc(new_length+1))) 00102 return pos; // Error 00103 00104 if ((from_cs == &my_charset_bin) || (to_cs == &my_charset_bin)) 00105 { 00106 // Safety if to_cs->mbmaxlen > 0 00107 new_length= min(arg_length, max_res_length); 00108 memcpy(pos, str, new_length); 00109 } 00110 else 00111 { 00112 uint dummy_errors; 00113 new_length= copy_and_convert((char*) pos, new_length, to_cs, str, 00114 arg_length, from_cs, &dummy_errors); 00115 } 00116 pos[new_length]= 0; 00117 *result_length= new_length; 00118 return pos; 00119 }
Here is the caller graph for this function:

| void** thd_ha_data | ( | const THD * | thd, | |
| const struct handlerton * | hton | |||
| ) |
Definition at line 190 of file sql_class.cc.
00191 { 00192 return (void **) thd->ha_data + hton->slot; 00193 }
| my_bool thd_in_lock_tables | ( | const THD * | thd | ) |
Definition at line 171 of file sql_class.cc.
Referenced by ha_archive::store_lock().
Here is the caller graph for this function:

| const char* thd_proc_info | ( | THD * | thd, | |
| const char * | info | |||
| ) |
Definition at line 183 of file sql_class.cc.
Referenced by ha_tina::check(), and ha_archive::check().
00184 { 00185 const char *old_info= thd->proc_info; 00186 thd->proc_info= info; 00187 return old_info; 00188 }
Here is the caller graph for this function:

| my_bool thd_tablespace_op | ( | const THD * | thd | ) |
Definition at line 177 of file sql_class.cc.
Referenced by ha_archive::store_lock().
Here is the caller graph for this function:

| bool update_precheck | ( | THD * | thd, | |
| TABLE_LIST * | tables | |||
| ) |
Definition at line 7544 of file sql_parse.cc.
Referenced by mysql_execute_command(), and mysql_test_update().
07545 { 07546 DBUG_ENTER("update_precheck"); 07547 if (thd->lex->select_lex.item_list.elements != thd->lex->value_list.elements) 07548 { 07549 my_message(ER_WRONG_VALUE_COUNT, ER(ER_WRONG_VALUE_COUNT), MYF(0)); 07550 DBUG_RETURN(TRUE); 07551 } 07552 DBUG_RETURN(check_one_table_access(thd, UPDATE_ACL, tables)); 07553 }
Here is the caller graph for this function:

| void view_store_options | ( | THD * | thd, | |
| st_table_list * | table, | |||
| String * | buff | |||
| ) |
Definition at line 1447 of file sql_show.cc.
Referenced by mysql_execute_command().
01448 { 01449 append_algorithm(table, buff); 01450 append_definer(thd, buff, &table->definer.user, &table->definer.host); 01451 if (table->view_suid) 01452 buff->append(STRING_WITH_LEN("SQL SECURITY DEFINER ")); 01453 else 01454 buff->append(STRING_WITH_LEN("SQL SECURITY INVOKER ")); 01455 }
Here is the caller graph for this function:

| int vprint_msg_to_log | ( | enum loglevel | level, | |
| const char * | format, | |||
| va_list | args | |||
| ) |
Definition at line 3966 of file log.cc.
Referenced by Log_to_file_event_handler::log_error(), and option_error_reporter().
03967 { 03968 char buff[1024]; 03969 uint length; 03970 DBUG_ENTER("vprint_msg_to_log"); 03971 03972 /* "- 5" is because of print_buffer_to_nt_eventlog() */ 03973 length= my_vsnprintf(buff, sizeof(buff) - 5, format, args); 03974 print_buffer_to_file(level, buff); 03975 03976 #ifdef __NT__ 03977 print_buffer_to_nt_eventlog(level, buff, length, sizeof(buff)); 03978 #endif 03979 03980 DBUG_RETURN(0); 03981 }
Here is the caller graph for this function:

Definition at line 142 of file mysqlslap.c.
Referenced by get_options(), main(), and run_scheduler().
Definition at line 530 of file mysqld.cc.
Referenced by init_common_variables(), Field_new_decimal::reset(), Item_sum_avg::reset_field(), Item_sum_sum::reset_field(), Item_sum_hybrid::reset_field(), Item_sum_variance::reset_field(), and Field_new_decimal::store_value().
Definition at line 556 of file mysqld.cc.
Referenced by acl_get(), acl_load(), check_db_name(), dispatch_command(), find_field_in_group_list(), find_field_in_tables(), find_files(), GRANT_NAME::GRANT_NAME(), ha_create_table(), ha_create_table_from_engine(), ha_delete_table(), init_common_variables(), insert_fields(), mysql_alter_table(), mysql_create_like_table(), mysql_create_table_internal(), mysql_grant(), mysql_init_variables(), mysql_install_plugin(), mysql_rename_db(), mysql_rename_table(), mysql_rm_known_files(), mysql_table_dump(), plugin_dl_add(), plugin_dl_del(), plugin_dl_find(), Item_ident::print(), schema_tables_add(), and test_if_number().
| const key_map key_map_empty |
Referenced by handler::keys_to_use_for_scanning().
Definition at line 307 of file sql_locale.cc.
Referenced by extract_date_time(), and sys_var_thd_lc_time_names::set_default().
| const char* primary_key_name |
Definition at line 33 of file sql_table.cc.
Referenced by get_schema_constraints_record(), get_topics_for_keyword(), make_unique_key_name(), mysql_alter_table(), mysql_explain_union(), sort_keys(), and store_create_info().
Definition at line 473 of file mysqld.cc.
Referenced by dispatch_command(), next_query_id(), and Item_func_uuid::val_str().
Definition at line 48 of file mysqlbinlog.cc.
Referenced by xid_t::get_my_xid(), Log_to_csv_event_handler::log_general(), Log_to_csv_event_handler::log_slow(), process_event(), xid_t::set(), and BackupRestore::update_apply_status().
Definition at line 556 of file mysqld.cc.
Referenced by acl_init(), acl_update_db(), acl_update_user(), append_identifier(), archive_db_init(), sys_var_character_set::check(), sys_var_collation::check(), sys_var_thd_date_time_format::check(), check_acl_user(), check_change_password(), check_column_name(), check_connection(), check_db_name(), check_duplicate_names(), sys_var::check_enum(), check_if_keyname_exists(), Field::check_int(), check_reserved_words(), sys_var::check_set(), check_table_name(), Event_scheduler::clean_queue(), close_temporary_tables(), compare_hostname(), compare_tables(), Event_timed::compile(), copy_event_to_schema_table(), create_func_version(), create_schema_table(), create_select_for_variable(), Table_triggers_list::create_trigger(), db_create_event(), db_create_routine(), db_drop_events_from_table(), db_load_routine(), db_update_event(), db_update_routine(), dispatch_command(), Event_scheduler::dump_internal_status(), Item_trigger_field::eq(), Item_field::eq(), Item::eq(), event_timed_db_equal(), event_timed_definer_equal(), event_timed_name_equal(), events_table_index_read_for_db(), evex_fill_row(), evex_print_warnings(), example_init_func(), execute_sqlcom_select(), filename_to_tablename(), fill_open_tables(), fill_schema_charsets(), fill_schema_coll_charset_app(), fill_schema_collation(), fill_schema_column_privileges(), fill_schema_processlist(), fill_schema_schema_privileges(), fill_schema_shemata(), fill_schema_table_privileges(), fill_schema_user_privileges(), find_acl_user(), sp_pcontext::find_cond(), ha_tina::find_current_row(), sp_pcontext::find_cursor(), find_field_in_group_list(), find_field_in_natural_join(), find_field_in_table(), find_field_in_table_sef(), find_field_in_view(), find_files(), find_item_in_list(), sp_pcontext::find_label(), find_schema_table(), find_type(), sp_pcontext::find_variable(), Rpl_filter::find_wild(), Item_func_get_system_var::fix_fields(), Item_name_const::fix_fields(), Item_func_uuid::fix_length_and_dec(), Item_func_collation::fix_length_and_dec(), Item_func_charset::fix_length_and_dec(), Item_func_user::fix_length_and_dec(), Item_func_database::fix_length_and_dec(), Item_func_sp::func_name(), get_all_tables(), Event_timed::get_create_event(), get_referential_constraints_record(), get_schema_column_record(), get_schema_key_column_usage_record(), get_schema_partitions_record(), get_schema_stat_record(), get_schema_tables_record(), get_schema_views_record(), grant_load(), GRANT_TABLE::GRANT_TABLE(), ha_archive::ha_archive(), ha_tina::ha_tina(), handle_grant_struct(), handle_grant_table(), hostname_requires_resolving(), sp_cache::init(), init_check_host(), init_max_user_conn(), Rpl_filter::init_table_rule_hash(), sys_var::item(), Item_func_get_system_var::Item_func_get_system_var(), Item_func_sysconst::Item_func_sysconst(), Item_func_user::Item_func_user(), item_user_lock_init(), iter_schema_engines(), list_open_tables(), make_character_sets_old_format(), make_columns_old_format(), make_date_time(), make_db_list(), make_empty_rec(), Item_sp_variable::make_field(), make_old_format(), make_proc_old_format(), make_schemata_old_format(), make_table_names_old_format(), make_truncated_value_warning(), make_unique_key_name(), make_unique_view_field_name(), mark_common_columns(), mi_check_print_msg(), modify_grant_table(), my_database_names_init(), my_dbopt_cleanup(), mysql_admin_table(), mysql_alter_table(), mysql_change_db(), mysql_checksum_table(), mysql_create_db(), mysql_create_frm(), mysql_create_like_table(), mysql_create_or_drop_trigger(), mysql_create_view(), mysql_drop_view(), mysql_execute_command(), mysql_ha_read(), mysql_init_variables(), mysql_install_plugin(), mysql_make_view(), mysql_prepare_table(), mysql_register_view(), mysql_revoke_all(), mysql_rm_arc_files(), mysql_rm_known_files(), mysql_rm_table_part2(), mysql_show_grants(), mysql_truncate(), mysql_uninstall_plugin(), mysqld_list_fields(), mysqld_list_processes(), mysqld_show_authors(), mysqld_show_column_types(), mysqld_show_contributors(), mysqld_show_create(), mysqld_show_create_db(), mysqld_show_privileges(), mysqld_show_warnings(), name_hash_search(), nr_of_decimals(), open_table(), open_table_def(), pack_header(), plugin_add(), plugin_dl_add(), plugin_init(), handler::print_error(), handler::print_keydup_error(), print_where(), remove_escape(), replace_column_table(), replace_db_table(), replace_table_table(), replace_user_table(), require_quotes(), select_describe(), send_check_errmsg(), Protocol::send_fields(), Item::set_name(), set_var_init(), setup_procedure(), Events::show_create_event(), sp_head::show_create_function(), sp_head::show_create_procedure(), show_handlerton(), show_plugins(), sp_head::show_routine_code(), show_routine_grants(), show_status_array(), sp_change_security_context(), sp_drop_db_routines(), sp_head::sp_head(), sp_revoke_privileges(), sp_use_new_db(), stat_print(), Event_scheduler::stop_all_running_events(), store_constraints(), store_create_info(), store_key_column_usage(), store_natural_using_join_columns(), store_schema_partitions_record(), store_schema_proc(), store_schema_shemata(), store_trigger(), table_check_intact(), tablename_to_filename(), TEST_filesort(), test_if_number(), test_if_string_in_list(), tina_init_func(), update_schema_privilege(), update_user_table(), uses_only_table_name_fields(), Item_func_dayname::val_str(), Item_func_monthname::val_str(), Item_func_uuid::val_str(), Item_func_database::val_str(), Item_func_trim::val_str(), Item_func_rtrim::val_str(), Item_func_ltrim::val_str(), Item_func_aes_decrypt::val_str(), and Item_func_aes_encrypt::val_str().
Definition at line 557 of file mysqld.cc.
Referenced by Table_triggers_list::change_table_name(), Table_triggers_list::check_n_load(), Table_triggers_list::create_trigger(), Table_triggers_list::drop_trigger(), Item_field::eq(), find_field_in_table_ref(), init_common_variables(), insert_fields(), multi_delete_set_locks_and_link_aux_tables(), mysql_alter_table(), mysql_init_variables(), mysql_schema_table(), open_table(), st_table_list::print(), and update_non_unique_table_error().
1.4.7

