| 720 | static bool wsrep_schema_ready= false; |
| 721 | |
| 722 | int 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 | |
| 755 | int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view) |
| 756 | { |
no test coverage detected