#include <NDBT_ReturnCodes.h>#include "consumer_restore.hpp"#include <my_sys.h>#include <NdbSleep.h>#include <signaldata/DictTabInfo.hpp>Include dependency graph for consumer_restore.cpp:

Go to the source code of this file.
Functions | |
| static void | callback (int, NdbTransaction *, void *) |
| static Uint32 | get_part_id (const NdbDictionary::Table *table, Uint32 hash_value) |
| static int | match_blob (const char *name) |
| static bool | default_nodegroups (NdbDictionary::Table *table) |
| static Uint32 | get_no_fragments (Uint64 max_rows, Uint32 no_nodes) |
| static void | set_default_nodegroups (NdbDictionary::Table *table) |
| static void | copy_byte (const char **data, char **new_data, uint *len) |
| static bool | use_part_id (const NdbDictionary::Table *table) |
Variables | |
| my_bool | opt_core |
| FilteredNdbOut | err |
| FilteredNdbOut | info |
| FilteredNdbOut | debug |
| const char * | g_connect_string |
| BaseString | g_options |
| static void callback | ( | int | , | |
| NdbTransaction * | , | |||
| void * | ||||
| ) | [static] |
Definition at line 1322 of file consumer_restore.cpp.
References restore_callback_t::restore.
01323 { 01324 restore_callback_t *cb = (restore_callback_t *)aObject; 01325 (cb->restore)->cback(result, cb); 01326 }
| static void copy_byte | ( | const char ** | data, | |
| char ** | new_data, | |||
| uint * | len | |||
| ) | [static] |
Definition at line 285 of file consumer_restore.cpp.
Referenced by BackupRestore::map_in_frm(), and BackupRestore::search_replace().
00286 { 00287 **new_data = **data; 00288 (*data)++; 00289 (*new_data)++; 00290 (*len)++; 00291 }
Here is the caller graph for this function:

| static bool default_nodegroups | ( | NdbDictionary::Table * | table | ) | [static] |
Definition at line 186 of file consumer_restore.cpp.
References NdbDictionary::Table::getFragmentData(), NdbDictionary::Table::getFragmentDataLen(), and UNDEF_NODEGROUP.
00187 { 00188 Uint16 *node_groups = (Uint16*)table->getFragmentData(); 00189 Uint32 no_parts = table->getFragmentDataLen() >> 1; 00190 Uint32 i; 00191 00192 if (node_groups[0] != 0) 00193 return false; 00194 for (i = 1; i < no_parts; i++) 00195 { 00196 if (node_groups[i] != UNDEF_NODEGROUP) 00197 return false; 00198 } 00199 return true; 00200 }
Here is the call graph for this function:

Definition at line 203 of file consumer_restore.cpp.
References err, and MAX_NDB_PARTITIONS.
Referenced by BackupRestore::table().
00204 { 00205 Uint32 i = 0; 00206 Uint32 acc_row_size = 27; 00207 Uint32 acc_fragment_size = 512*1024*1024; 00208 Uint32 no_parts= (max_rows*acc_row_size)/acc_fragment_size + 1; 00209 Uint32 reported_parts = no_nodes; 00210 while (reported_parts < no_parts && ++i < 4 && 00211 (reported_parts + no_parts) < MAX_NDB_PARTITIONS) 00212 reported_parts+= no_nodes; 00213 if (reported_parts < no_parts) 00214 { 00215 err << "Table will be restored but will not be able to handle the maximum"; 00216 err << " amount of rows as requested" << endl; 00217 } 00218 return reported_parts; 00219 }
Here is the caller graph for this function:

| static Uint32 get_part_id | ( | const NdbDictionary::Table * | table, | |
| Uint32 | hash_value | |||
| ) | [static] |
Definition at line 1161 of file consumer_restore.cpp.
References NdbDictionary::Table::getFragmentCount(), NdbDictionary::Table::getLinearFlag(), and mask.
Referenced by BackupRestore::logEntry(), and BackupRestore::tuple_a().
01163 { 01164 Uint32 no_frags = table->getFragmentCount(); 01165 01166 if (table->getLinearFlag()) 01167 { 01168 Uint32 part_id; 01169 Uint32 mask = 1; 01170 while (no_frags > mask) mask <<= 1; 01171 mask--; 01172 part_id = hash_value & mask; 01173 if (part_id >= no_frags) 01174 part_id = hash_value & (mask >> 1); 01175 return part_id; 01176 } 01177 else 01178 return (hash_value % no_frags); 01179 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static int match_blob | ( | const char * | name | ) | [static] |
Definition at line 111 of file consumer_restore.cpp.
References buf.
Referenced by BackupRestore::table().
00111 { 00112 int cnt, id1, id2; 00113 char buf[256]; 00114 if((cnt = sscanf(name, "%[^/]/%[^/]/NDB$BLOB_%d_%d", buf, buf, &id1, &id2)) == 4){ 00115 return id1; 00116 } 00117 00118 return -1; 00119 }
Here is the caller graph for this function:

| static void set_default_nodegroups | ( | NdbDictionary::Table * | table | ) | [static] |
Definition at line 222 of file consumer_restore.cpp.
References NdbDictionary::Table::getFragmentCount(), MAX_NDB_PARTITIONS, NdbDictionary::Table::setFragmentData(), and UNDEF_NODEGROUP.
Referenced by BackupRestore::table().
00223 { 00224 Uint32 no_parts = table->getFragmentCount(); 00225 Uint16 node_group[MAX_NDB_PARTITIONS]; 00226 Uint32 i; 00227 00228 node_group[0] = 0; 00229 for (i = 1; i < no_parts; i++) 00230 { 00231 node_group[i] = UNDEF_NODEGROUP; 00232 } 00233 table->setFragmentData((const void*)node_group, 2 * no_parts); 00234 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static bool use_part_id | ( | const NdbDictionary::Table * | table | ) | [static] |
Definition at line 1152 of file consumer_restore.cpp.
References NdbDictionary::Table::getDefaultNoPartitionsFlag(), NdbDictionary::Table::getFragmentType(), and NdbDictionary::Object::UserDefined.
01153 { 01154 if (table->getDefaultNoPartitionsFlag() && 01155 (table->getFragmentType() == NdbDictionary::Object::UserDefined)) 01156 return false; 01157 else 01158 return true; 01159 }
Here is the call graph for this function:

| FilteredNdbOut err |
Referenced by _create_index_by_sort(), _mi_balance_page(), _mi_ck_real_delete(), _mi_cmp_buffer(), _mi_cmp_dynamic_record(), _mi_ft_erase(), _mi_ft_update(), _mi_get_block_info(), _mi_put_key_in_record(), _mi_read_dynamic_record(), _mi_read_pack_record(), _mi_read_rnd_dynamic_record(), _mi_read_rnd_pack_record(), _mi_rec_check(), _mi_rec_unpack(), _mi_search(), _mi_search_pos(), _mi_write_part_record(), _mi_write_static_record(), LOGGER::activate_log_handler(), add_status_vars(), MYSQL_BIN_LOG::append(), MYSQL_BIN_LOG::appendv(), ha_myisam::assign_to_keycache(), az_open(), azflush(), ha_myisam::backup(), bin2decimal(), btr_cur_del_mark_set_clust_rec(), btr_cur_del_mark_set_sec_rec(), btr_cur_ins_lock_and_undo(), btr_cur_optimistic_insert(), btr_cur_optimistic_update(), btr_cur_pessimistic_insert(), btr_cur_pessimistic_update(), btr_cur_upd_lock_and_undo(), btr_cur_update_in_place(), btr_insert_on_non_leaf_level(), btr_node_ptr_delete(), buf_read_ahead_linear(), buf_read_ahead_random(), buf_read_ibuf_merge_pages(), buf_read_page(), buf_read_recv_pages(), BackupRestore::cback(), sys_var_thd_storage_engine::check(), set_var::check(), check_duplicate_names(), sys_var::check_enum(), check_grant(), check_grant_all_columns(), check_grant_column(), check_grant_routine(), sys_var::check_set(), check_that_all_fields_are_given_values(), check_user(), chk_index(), chk_index_down(), clear_table(), cli_read_binary_rows(), SCI_Transporter::closeSCI(), com_edit(), com_go(), com_server_help(), Instance_options::complete_initialization(), compress(), compress2(), Event_timed::compute_next_execution_time(), connect_n_handle_errors(), copy_data_between_tables(), copy_up_file_and_fill(), NdbDictInterface::create_file(), NdbDictInterface::create_filegroup(), create_myisam_from_heap(), create_myisam_tmp_table(), create_sort_index(), create_sys_files(), create_table_precheck(), create_tmp_table(), Dbdict::createEventUTIL_PREPARE(), NdbDictInterface::createIndex(), NdbDictInterface::createOrAlterTable(), SCI_Transporter::createSequence(), cs_copy_data(), d_search(), db_create_event(), db_update_event(), Item_func_div::decimal_op(), decimal_shift(), deflateParams(), del(), delayed_get_table(), desc_datafile(), desc_logfilegroup(), desc_tablespace(), desc_undofile(), destroy(), dict_create_foreign_constraints(), dict_create_index_step(), dict_create_table_step(), dict_load_foreigns(), dict_load_table(), SCI_Transporter::disconnectImpl(), SCI_Transporter::disconnectLocal(), SCI_Transporter::disconnectRemote(), Dbtup::disk_page_prealloc(), CPCD::Process::do_exec(), do_test(), SCI_Transporter::doSend(), NdbDictInterface::drop_file(), NdbDictInterface::drop_filegroup(), dump_remote_log_entries(), dump_table(), dyn_string_cmp(), ha_myisam::end_bulk_insert(), BackupRestore::endOfTables(), BackupRestore::errorHandler(), evex_print_warnings(), examine_log(), Tsman::execALLOC_EXTENT_REQ(), Tsman::execALLOC_PAGE_REQ(), Backup::execBACKUP_FRAGMENT_REF(), Tsman::execCREATE_FILE_REQ(), Lgman::execCREATE_FILE_REQ(), Tsman::execCREATE_FILEGROUP_REQ(), Lgman::execCREATE_FILEGROUP_REQ(), Dbdih::execCREATE_FRAGMENTATION_REQ(), Qmgr::execDISCONNECT_REP(), Dbdict::execDROP_INDX_REQ(), Tsman::execFREE_EXTENT_REQ(), Tsman::execFSREADCONF(), Dbdih::execPREP_DROP_TAB_REQ(), Restore::execRESTORE_LCP_REQ(), Dbdict::execSUB_REMOVE_REF(), Dbdict::execSUB_START_REF(), Dbdict::execSUB_STOP_REF(), Dbtux::execTUX_ADD_ATTRREQ(), DbUtil::execUTIL_CREATE_LOCK_REQ(), DbUtil::execUTIL_DESTORY_LOCK_REQ(), Suma::execUTIL_SEQUENCE_REF(), extract_date_time(), fetch_string_with_conversion(), fil_create_new_single_table_tablespace(), fil_load_single_table_tablespaces(), fil_write_flushed_lsn_to_data_files(), filecopy(), filesort(), Instance_options::fill_instance_version(), Instance_options::fill_log_options(), Instance_options::fill_mysqld_real_path(), fill_schema_proc(), MYSQL_BIN_LOG::find_next_log(), Item_subselect::fix_fields(), Item_func_match::fix_index(), MYSQL_BIN_LOG::flush_and_sync(), flush_ft_buf(), ft_boolean_read_next(), ft_init_boolean_search(), ft_init_nlq_search(), get_all_tables(), Instance_options::get_default_option(), Gis_read_stream::get_next_number(), get_no_fragments(), get_options(), get_quick_select_for_ref(), get_slaves_from_master(), get_var_with_binlog(), NdbDictionaryImpl::getIndex(), RestoreDataIterator::getNextTuple(), gz_open(), gzflush(), ha_commit_one_phase(), ha_commit_trans(), ha_create_table(), ha_prepare(), ha_release_savepoint(), ha_rollback_to_savepoint(), ha_rollback_trans(), ha_savepoint(), handle_delayed_insert(), delayed_insert::handle_inserts(), handle_local_infile(), heap_delete(), heap_update(), heap_write(), ibuf_delete_rec(), ibuf_insert(), ibuf_insert_low(), BackupRestore::init(), Instance_options::init(), init_key_cache(), init_re_comp(), SCI_Transporter::init_remote(), init_replace_regex(), init_tmpdir(), SCI_Transporter::initLocalSegment(), innobase_start_or_create_for_mysql(), set_var::light_check(), load_defaults(), lock_clust_rec_modify_check_and_lock(), lock_clust_rec_read_check_and_lock(), lock_rec_insert_check_and_lock(), lock_rec_lock(), lock_rec_lock_slow(), lock_sec_rec_modify_check_and_lock(), lock_sec_rec_read_check_and_lock(), lock_table(), BackupRestore::logEntry(), main(), make_empty_rec(), manager(), mark_common_columns(), RestoreMetaData::markSysTables(), match_re(), merge_buffers(), mi_delete_all_rows(), mi_open(), mi_preload(), mi_repair(), mi_repair_by_sort(), mi_repair_parallel(), mi_rkey(), mi_sort_index(), mi_sort_records(), modify_defaults_file(), my_append(), my_b_vprintf(), my_chsize(), my_close(), my_copy(), my_delete(), my_fclose(), my_search_option_files(), my_var_write(), myrg_create(), myrg_open(), myrg_rfirst(), myrg_rkey(), myrg_rlast(), myrg_rnext(), myrg_rnext_same(), myrg_rprev(), mysql_admin_table(), mysql_alter_table(), mysql_checksum_table(), mysql_create_frm(), mysql_create_like_table(), mysql_create_table_internal(), mysql_create_view(), mysql_discard_or_import_tablespace(), mysql_ha_open(), mysql_ha_read(), mysql_install_plugin(), mysql_load(), mysql_make_view(), mysql_manager_connect(), mysql_rename_tables(), mysql_rename_view(), mysql_rm_arc_files(), mysql_rm_known_files(), mysql_rpl_probe(), mysql_select(), mysql_table_dump(), mysql_uninstall_plugin(), mysqld_show_warnings(), ndb_init(), ndb_mgm_alloc_nodeid(), NdbHost_GetHostName(), net_send_error(), net_send_error_323(), number_to_datetime(), BackupRestore::object(), ha_myisammrg::open(), MYSQL_BIN_LOG::open(), MYSQL_LOG::open(), open_binary_frm(), open_binlog(), open_new_frm(), open_table_def(), open_table_from_share(), open_tables(), open_unireg_entry(), AsyncFile::openReq(), os_aio(), os_event_wait(), os_event_wait_time(), os_file_get_last_error(), os_file_handle_error(), os_file_handle_error_no_exit(), os_file_write(), os_mutex_enter(), parse_output_and_get_value(), RestoreMetaData::parseTableDescriptor(), plugin_add(), plugin_finalize(), plugin_foreach(), plugin_init(), plugin_initialize(), ha_myisam::preload_keys(), JOIN::prepare(), proc_analyse_init(), yaSSL::Certificate::Process(), push_warning(), Log_event::read_log_event(), read_texts(), LocalConfig::readConnectString(), LocalConfig::readFile(), RestoreMetaData::readFragmentInfo(), readfrm(), RestoreMetaData::readGCPEntry(), BackupFile::readHeader(), RestoreMetaData::readMetaTableDesc(), RestoreMetaData::readMetaTableList(), AsyncFile::readReq(), recv_recovery_from_checkpoint_start(), remove_dup_with_compare(), remove_dup_with_hash_index(), Buffer::reserve(), MYSQL_BIN_LOG::reset_logs(), ha_myisam::restore(), row_create_index_for_mysql(), row_create_table_for_mysql(), row_delete_constraint(), row_discard_tablespace_for_mysql(), row_drop_database_for_mysql(), row_drop_table_for_mysql(), row_import_tablespace_for_mysql(), row_ins(), row_ins_check_foreign_constraint(), row_ins_check_foreign_constraints(), row_ins_clust_index_entry_by_modify(), row_ins_duplicate_error_in_clust(), row_ins_foreign_check_on_constraint(), row_ins_index_entry(), row_ins_index_entry_low(), row_ins_index_entry_step(), row_ins_scan_sec_index_for_duplicate(), row_ins_sec_index_entry_by_modify(), row_ins_set_exclusive_rec_lock(), row_ins_set_shared_rec_lock(), row_ins_step(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_mysql_handle_errors(), row_purge_remove_clust_if_poss_low(), row_purge_remove_sec_if_poss_low(), row_purge_step(), row_rename_table_for_mysql(), row_search_for_mysql(), row_sel(), row_sel_build_committed_vers_for_mysql(), row_sel_build_prev_vers(), row_sel_build_prev_vers_for_mysql(), row_sel_get_clust_rec(), row_sel_get_clust_rec_for_mysql(), row_sel_step(), row_table_add_foreign_constraints(), row_truncate_table_for_mysql(), row_undo(), row_undo_ins(), row_undo_ins_remove_clust_rec(), row_undo_ins_remove_sec(), row_undo_ins_remove_sec_low(), row_undo_mod(), row_undo_mod_clust(), row_undo_mod_clust_low(), row_undo_mod_del_mark_or_remove_sec(), row_undo_mod_del_mark_or_remove_sec_low(), row_undo_mod_del_mark_sec(), row_undo_mod_del_unmark_sec_and_undo_update(), row_undo_mod_remove_clust_low(), row_undo_mod_upd_del_sec(), row_undo_mod_upd_exist_sec(), row_undo_step(), row_upd(), row_upd_check_references_constraints(), row_upd_clust_rec(), row_upd_clust_rec_by_insert(), row_upd_clust_step(), row_upd_del_mark_clust_rec(), row_upd_in_place_in_select(), row_upd_sec_index_entry(), row_upd_sec_step(), row_upd_step(), row_update_cascade_for_mysql(), row_update_for_mysql(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), row_vers_impl_x_locked_off_kernel(), row_vers_old_has_index_entry(), Listener_thread::run(), run_query_normal(), run_test(), rx_try(), scan_delete(), scan_print(), scan_update(), scanReadRecords(), search_default_file_with_ext(), sel_set_rec_lock(), select_count(), Item_in_subselect::select_in_like_transformer(), Protocol::send_fields(), send_fields(), Item_proc_int::set(), yaSSL::CertManager::SetPrivateKey(), setup_copy_fields(), setval(), Events::show_create_event(), sort_one_index(), sort_record_index(), sp_drop_db_routines(), sql_set_variables(), srv_boot(), yaSSL::SSL::SSL(), MgmtSrvr::startEventLog(), SCI_Transporter::startSequence(), Field_set::store(), Field_enum::store(), Field_new_decimal::store(), Field_bit::store_decimal(), Field_str::store_decimal(), Field_num::store_decimal(), store_natural_using_join_columns(), store_to_protocol_packet(), store_top_level_join_columns(), str2my_decimal(), str_to_datetime(), BackupRestore::table(), trx_rollback_for_mysql(), trx_rollback_last_sql_stat_for_mysql(), trx_rollback_or_clean_all_without_sess(), trx_rollback_to_savepoint_for_mysql(), trx_undo_prev_version_build(), BackupRestore::tuple_a(), uncompress(), underflow(), sys_var_log_state::update(), BackupRestore::update_apply_status(), ha_myisammrg::update_create_info(), update_dynamic_record(), update_frm_version(), update_state_info(), update_sys_var_str_path(), Item_decimal_typecast::val_decimal(), Item_proc_string::val_int(), Item_func_makedate::val_int(), Item_str_func::val_int(), Item_func_inet_aton::val_int(), Item_copy_string::val_int(), Item_cache_str::val_int(), Item_string::val_int(), Item_func_xpath_sum::val_real(), Item_func_makedate::val_str(), Item_load_file::val_str(), Item_func_conv::val_str(), Item_func_lpad::val_str(), Item_func_rpad::val_str(), Item_func_repeat::val_str(), yaSSL::CertManager::Validate(), RestoreDataIterator::validateFragmentFooter(), var_get(), w_search(), MYSQL_BIN_LOG::write(), MYSQL_QUERY_LOG::write(), write_delayed(), write_dynamic_record(), write_ieee_debugging_info(), write_keys(), write_keys_varlen(), write_merge_key_varlen(), write_record(), and writekeys().
| const char* g_connect_string |
Referenced by main().
| FilteredNdbOut info |
Referenced by _ft2_search(), btr_cur_search_to_nth_level(), btr_search_info_create(), checkMandatory(), Sensitive_cursor::close(), copy_data_between_tables(), debug_end_block(), debug_end_function(), debug_find_named_type(), debug_find_tagged_type(), debug_make_array_type(), debug_make_bool_type(), debug_make_complex_type(), debug_make_const_type(), debug_make_enum_type(), debug_make_float_type(), debug_make_function_type(), debug_make_indirect_type(), debug_make_int_type(), debug_make_method_type(), debug_make_object_type(), debug_make_offset_type(), debug_make_pointer_type(), debug_make_range_type(), debug_make_reference_type(), debug_make_set_type(), debug_make_struct_type(), debug_make_undefined_tagged_type(), debug_make_void_type(), debug_make_volatile_type(), debug_name_type(), debug_record_float_const(), debug_record_function(), debug_record_int_const(), debug_record_line(), debug_record_parameter(), debug_record_typed_const(), debug_record_variable(), debug_set_filename(), debug_start_block(), debug_start_source(), debug_tag_type(), debug_write(), Thread_registry::deliver_shutdown(), dict_create_add_foreign_field_to_dictionary(), dict_create_add_foreign_to_dictionary(), LocalDictCache::drop(), BackupRestore::endOfLogEntrys(), BackupRestore::endOfTables(), Sensitive_cursor::fetch(), find_record_with_key(), finish_stab(), flush_cached_records(), ft_boolean_read_next(), ft_nlq_read_next(), ftb_parse_query_internal(), NdbDictionaryImpl::get_local_table_info(), get_one_option(), Ndb::getAutoIncrementValue(), NdbDictionaryImpl::getBlobTable(), NdbDictionaryImpl::getIndex(), NdbDictionaryImpl::getTable(), handler_error(), Ndb::handleReceivedSignal(), heap_open(), heap_panic(), heap_rename(), hp_find_named_heap(), ieee_add_bb11_blocks(), ieee_complex_type(), ieee_empty_type(), ieee_enum_type(), ieee_float_type(), ieee_int_type(), ieee_start_compilation_unit(), ieee_void_type(), ieee_write_undefined_tag(), BackupRestore::init(), main(), mi_check_status(), mi_delete_table(), mi_get_status(), mi_open(), mi_panic(), mi_rename(), mi_update_status(), myisamchk(), myrg_panic(), mysql_delete(), mysql_insert(), mysql_load(), mysql_update(), BackupRestore::object(), pack_screens(), pars_info_create(), parse_stab(), Sensitive_cursor::post_open(), pr_array_type(), pr_bool_type(), pr_class_baseclass(), pr_class_end_method(), pr_class_method_variant(), pr_class_start_method(), pr_class_static_member(), pr_class_static_method_variant(), pr_complex_type(), pr_const_type(), pr_empty_type(), pr_end_block(), pr_end_function(), pr_end_struct_type(), pr_enum_type(), pr_float_type(), pr_function_parameter(), pr_function_type(), pr_int_type(), pr_lineno(), pr_method_type(), pr_offset_type(), pr_pointer_type(), pr_range_type(), pr_reference_type(), pr_set_type(), pr_start_block(), pr_start_class_type(), pr_start_compilation_unit(), pr_start_function(), pr_start_source(), pr_start_struct_type(), pr_struct_field(), pr_tag(), pr_tag_type(), pr_typdef(), pr_typed_constant(), pr_typedef_type(), pr_variable(), pr_void_type(), pr_volatile_type(), NdbDictionaryImpl::putTable(), readArguments(), Ndb::readAutoIncrementValue(), RestoreDataIterator::readFragmentHeader(), rec_set_nth_field_extern_bit_old(), rec_set_nth_field_null_bit(), NdbTransaction::receiveSCAN_TABCONF(), Transporter::report_error(), reportShutdown(), ror_intersect_init(), row_delete_constraint_low(), row_discard_tablespace_for_mysql(), row_drop_table_for_mysql(), row_rename_table_for_mysql(), row_truncate_table_for_mysql(), saveInConfigValues(), Ndb::setAutoIncrementValue(), sql_connect(), sub_select(), BackupRestore::table(), test_if_reopen(), walk_and_match(), and xarecover_handlerton().
Definition at line 33 of file ndb_opts.h.
1.4.7

