MCPcopy Create free account
hub / github.com/MariaDB/server / init

Method init

sql/wsrep_schema.cc:722–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720static bool wsrep_schema_ready= false;
721
722int Wsrep_schema::init()
723{
724 DBUG_ENTER("Wsrep_schema::init()");
725 int ret;
726 THD* thd= new THD(next_thread_id());
727 if (!thd) {
728 WSREP_ERROR("Unable to get thd");
729 DBUG_RETURN(1);
730 }
731 wsrep_init_thd_for_schema(thd);
732
733 if (Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(create_cluster_table_str)) ||
734 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(create_members_table_str)) ||
735 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(create_frag_table_str)) ||
736 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(create_allowlist_table_str)) ||
737 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(alter_frag_table)) ||
738 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(alter_cluster_table)) ||
739 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(alter_members_table)) ||
740 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN(alter_allowlist_table)) ||
741 Wsrep_schema_impl::execute_SQL(thd, STRING_WITH_LEN("SET GLOBAL innodb_log_checkpoint_now=1")))
742 {
743 ret= 1;
744 }
745 else
746 {
747 wsrep_schema_ready= true;
748 ret= 0;
749 }
750
751 delete thd;
752 DBUG_RETURN(ret);
753}
754
755int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view)
756{

Callers 1

execute_SQLFunction · 0.45

Calls 3

next_thread_idFunction · 0.85
execute_SQLFunction · 0.85

Tested by

no test coverage detected