Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.6.11
-
None
-
Rhel 8
MariaDB 10.6.11
Description
Hello, I am testing the usage of the Spider engine with Galera. I cannot find any use cases or examples of that kind of setup. Is there a reason for that?
When I install the Spider plugin on one of the nodes these are the errors:
MariaDB [(none)]> INSTALL SONAME "ha_spider"; |
2022-11-25 9:14:23 44 [Note] Loaded 'ha_spider.so' with offset 0x7f6847cd9000 |
[ERROR] PROCEDURE mysql.spider_fix_one_table does not exist
|
2022-11-25 9:14:23 11 [ERROR] Slave SQL: Error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_one_table`(tab_name char(255) charset utf8 collate utf8_bin, test_col_name char(255) charset utf8 collate utf8_bin, _sql text charset utf8 collate utf8_bin) |
begin set @col_exists := 0; select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = tab_name AND COLUMN_NAME = test_col_name; if @col_exists = 0 then select @stmt := _sql; prepare sp_stmt1 from @stmt; execute sp_stmt1; end if;end', Internal MariaDB error code: 1959 |
2022-11-25 9:14:23 11 [Warning] WSREP: Ignoring error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_one_table`(tab_name char(255) charset utf8 collate utf8_bin, test_col_name char(255) charset utf8 collate utf8_bin, _sql text charset utf8 collate utf8_bin) |
begin set @col_exists := 0; select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = tab_name AND COLUMN_NAME = test_col_name; if @col_exists = 0 then select @stmt := _sql; prepare sp_stmt1 from @stmt; execute sp_stmt1; end if;end', Error_code: 1959 |
2022-11-25 9:14:23 30 [ERROR] Slave SQL: Error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_system_tables`() |
begin select substring_index(substring_index(version(), '-', 2), '-', -1) into @server_name; if @server_name regexp '^[0-9]+$' then select substring_index(substring_index(version(), '-', 3), '-', -1) into @server_name; end if; select substring_index(version(), '.', 1) into @server_major_version; select substring_index(substring_index(version(), '.', 2), '.', -1) into @server_minor_version; call mysql.spider_fix_one_table('spider_tables', 'server', 'alter table mysql.spider_tables add server char(64) default null, add scheme char(64) default null, add host char(64) default null, add port char(5) default null, add socket char(64) default null, add username char(64) default null, add password char(64) default null, add tgt_db_name char(64) default null, add tgt_table_name char(64) default null'); select COLU |
2022-11-25 9:14:23 30 [Warning] WSREP: Ignoring error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_system_tables`() |
begin select substring_index(substring_index(version(), '-', 2), '-', -1) into @server_name; if @server_name regexp '^[0-9]+$' then select substring_index(substring_index(version(), '-', 3), '-', -1) into @server_name; end if; select substring_index(version(), '.', 1) into @server_major_version; select substring_index(substring_index(version(), '.', 2), '.', -1) into @server_minor_version; call mysql.spider_fix_one_table('spider_tables', 'server', 'alter table mysql.spider_tables add server char(64) default null, add scheme char(64) default null, add host char(64) default null, add port char(5) default null, add socket char(64) default null, add username char(64) default null, add password char(64) default null, add tgt_db_name char(64) default null, add tgt_table_name char(64) default null'); select |
2022-11-25 9:14:23 31 [ERROR] Slave SQL: Error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_one_table`(tab_name char(255) charset utf8 collate utf8_bin, test_col_name char(255) charset utf8 collate utf8_bin, _sql text charset utf8 collate utf8_bin) |
begin set @col_exists := 0; select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = tab_name AND COLUMN_NAME = test_col_name; if @col_exists = 0 then select @stmt := _sql; prepare sp_stmt1 from @stmt; execute sp_stmt1; end if;end', Internal MariaDB error code: 1959 |
2022-11-25 9:14:23 31 [Warning] WSREP: Ignoring error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_one_table`(tab_name char(255) charset utf8 collate utf8_bin, test_col_name char(255) charset utf8 collate utf8_bin, _sql text charset utf8 collate utf8_bin) |
begin set @col_exists := 0; select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = tab_name AND COLUMN_NAME = test_col_name; if @col_exists = 0 then select @stmt := _sql; prepare sp_stmt1 from @stmt; execute sp_stmt1; end if;end', Error_code: 1959 |
2022-11-25 9:14:23 12 [ERROR] Slave SQL: Error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_system_tables`() |
begin select substring_index(substring_index(version(), '-', 2), '-', -1) into @server_name; if @server_name regexp '^[0-9]+$' then select substring_index(substring_index(version(), '-', 3), '-', -1) into @server_name; end if; select substring_index(version(), '.', 1) into @server_major_version; select substring_index(substring_index(version(), '.', 2), '.', -1) into @server_minor_version; call mysql.spider_fix_one_table('spider_tables', 'server', 'alter table mysql.spider_tables add server char(64) default null, add scheme char(64) default null, add host char(64) default null, add port char(5) default null, add socket char(64) default null, add username char(64) default null, add password char(64) default null, add tgt_db_name char(64) default null, add tgt_table_name char(64) default null'); select COLU |
2022-11-25 9:14:23 12 [Warning] WSREP: Ignoring error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_fix_system_tables`() |
begin select substring_index(substring_index(version(), '-', 2), '-', -1) into @server_name; if @server_name regexp '^[0-9]+$' then select substring_index(substring_index(version(), '-', 3), '-', -1) into @server_name; end if; select substring_index(version(), '.', 1) into @server_major_version; select substring_index(substring_index(version(), '.', 2), '.', -1) into @server_minor_version; call mysql.spider_fix_one_table('spider_tables', 'server', 'alter table mysql.spider_tables add server char(64) default null, add scheme char(64) default null, add host char(64) default null, add port char(5) default null, add socket char(64) default null, add username char(64) default null, add password char(64) default null, add tgt_db_name char(64) default null, add tgt_table_name char(64) default null'); select |
2022-11-25 9:14:23 38 [ERROR] Slave SQL: Error 'PROCEDURE mysql.spider_fix_one_table does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_fix_one_table', Internal MariaDB error code: 1305 |
2022-11-25 9:14:23 38 [Warning] WSREP: Ignoring error 'PROCEDURE mysql.spider_fix_one_table does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_fix_one_table', Error_code: 1305 |
2022-11-25 9:14:23 41 [ERROR] Slave SQL: Error 'PROCEDURE mysql.spider_fix_system_tables does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_fix_system_tables', Internal MariaDB error code: 1305 |
2022-11-25 9:14:23 41 [Warning] WSREP: Ignoring error 'PROCEDURE mysql.spider_fix_system_tables does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_fix_system_tables', Error_code: 1305 |
2022-11-25 9:14:23 23 [ERROR] Slave SQL: Error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_plugin_installer`() |
begin set @win_plugin := IF(@@version_compile_os like 'Win%', 1, 0); set @have_spider_i_s_alloc_mem_plugin := 0; select @have_spider_i_s_alloc_mem_plugin := 1 from INFORMATION_SCHEMA.plugins where PLUGIN_NAME = 'SPIDER_ALLOC_MEM'; set @have_spider_alloc_mem_plugin := 0; select @have_spider_alloc_mem_plugin := 1 from mysql.plugin where name = 'spider_alloc_mem'; if @have_spider_i_s_alloc_mem_plugin = 0 then if @have_spider_alloc_mem_plugin = 1 then /* spider_alloc_mem plugin is present in mysql.plugin but not in information_schema.plugins. Remove spider_alloc_mem plugin entry in mysql.plugin first. */ delete from mysql.plugin where name = 'spider_alloc_mem'; end if; if @win_plugin = 0 then install plugin spider_alloc_mem soname 'ha_spider.so'; else install plugin spider_alloc_mem soname |
2022-11-25 9:14:23 23 [Warning] WSREP: Ignoring error 'Invalid role specification ``' on query. Default database: ''. Query: 'CREATE DEFINER=`` PROCEDURE `mysql`.`spider_plugin_installer`() |
begin set @win_plugin := IF(@@version_compile_os like 'Win%', 1, 0); set @have_spider_i_s_alloc_mem_plugin := 0; select @have_spider_i_s_alloc_mem_plugin := 1 from INFORMATION_SCHEMA.plugins where PLUGIN_NAME = 'SPIDER_ALLOC_MEM'; set @have_spider_alloc_mem_plugin := 0; select @have_spider_alloc_mem_plugin := 1 from mysql.plugin where name = 'spider_alloc_mem'; if @have_spider_i_s_alloc_mem_plugin = 0 then if @have_spider_alloc_mem_plugin = 1 then /* spider_alloc_mem plugin is present in mysql.plugin but not in information_schema.plugins. Remove spider_alloc_mem plugin entry in mysql.plugin first. */ delete from mysql.plugin where name = 'spider_alloc_mem'; end if; if @win_plugin = 0 then install plugin spider_alloc_mem soname 'ha_spider.so'; else install plugin spider_alloc_mem s |
2022-11-25 9:14:23 2 [ERROR] Slave SQL: Error 'PROCEDURE mysql.spider_plugin_installer does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_plugin_installer', Internal MariaDB error code: 1305 |
2022-11-25 9:14:23 2 [Warning] WSREP: Ignoring error 'PROCEDURE mysql.spider_plugin_installer does not exist' on query. Default database: ''. Query: 'drop procedure mysql.spider_plugin_installer', Error_code: 1305 |
The Spider tables are created on all of the Galera members:
node2:
MariaDB [mysql]> show tables;
|
+------------------------------------+
|
| Tables_in_mysql |
|
+------------------------------------+
|
| column_stats |
|
| columns_priv |
|
| db |
|
| event |
|
| func |
|
| general_log |
|
| global_priv |
|
| gtid_slave_pos |
|
| help_category |
|
| help_keyword |
|
| help_relation |
|
| help_topic |
|
| index_stats |
|
| innodb_index_stats |
|
| innodb_table_stats |
|
| plugin |
|
| proc |
|
| procs_priv |
|
| proxies_priv |
|
| roles_mapping |
|
| servers |
|
| slow_log |
|
| spider_link_failed_log |
|
| spider_link_mon_servers |
|
| spider_table_crd |
|
| spider_table_position_for_recovery |
|
| spider_table_sts |
|
| spider_tables |
|
| spider_xa |
|
| spider_xa_failed_log |
|
| spider_xa_member |
|
| table_stats |
|
| tables_priv |
|
| time_zone |
|
| time_zone_leap_second |
|
| time_zone_name |
|
| time_zone_transition |
|
| time_zone_transition_type |
|
| transaction_registry |
|
| user |
|
| wsrep_cluster |
|
| wsrep_cluster_members |
|
| wsrep_streaming_log |
|
+------------------------------------+
|
|
MariaDB [mysql]> SELECT engine, support, transactions, xa FROM information_schema.engines;
|
+--------------------+---------+--------------+------+
|
| engine | support | transactions | xa |
|
+--------------------+---------+--------------+------+
|
| SPIDER | YES | YES | YES |
|
| MRG_MyISAM | YES | NO | NO |
|
| MEMORY | YES | NO | NO |
|
| Aria | YES | NO | NO |
|
| MyISAM | YES | NO | NO |
|
| SEQUENCE | YES | YES | NO |
|
| InnoDB | DEFAULT | YES | YES |
|
| PERFORMANCE_SCHEMA | YES | NO | NO |
|
| CSV | YES | NO | NO |
|
+--------------------+---------+--------------+------+
|
|
When I restart one of the nodes:
[root@db3-dashboard-new ~]# systemctl start mariadb |
Just hangs here and this is the live process:
/usr/sbin/mysqld --user=mysql --wsrep_recover --disable-log-error
If I run it manually:
/usr/sbin/mysqld --user=mysql --wsrep_recover
This is the log, and the node is not connecting to the cluster
2022-11-25 9:23:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 |
2022-11-25 9:23:11 0 [Note] InnoDB: Number of pools: 1 |
2022-11-25 9:23:11 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions |
2022-11-25 9:23:11 0 [Note] InnoDB: Using Linux native AIO |
2022-11-25 9:23:11 0 [Note] InnoDB: Initializing buffer pool, total size = 284541583360, chunk size = 134217728 |
2022-11-25 9:23:12 0 [Note] InnoDB: Completed initialization of buffer pool |
2022-11-25 9:23:12 0 [Note] InnoDB: 128 rollback segments are active. |
2022-11-25 9:23:12 0 [Note] InnoDB: Creating shared tablespace for temporary tables |
2022-11-25 9:23:12 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... |
2022-11-25 9:23:12 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. |
2022-11-25 9:23:12 0 [Note] InnoDB: 10.6.11 started; log sequence number 132069; transaction id 170 |
2022-11-25 9:23:12 0 [Warning] InnoDB: Skipping buffer pool dump/restore during wsrep recovery. |
2022-11-25 9:23:12 0 [Note] Plugin 'FEEDBACK' is disabled. |
2022-11-25 9:23:12 0 [Note] Loaded 'ha_spider.so' with offset 0x7f8c88036000 |
2022-11-25 9:23:12 0 [Note] Server socket created on IP: '0.0.0.0'. |
2022-11-25 9:23:12 0 [Note] Server socket created on IP: '::'. |
2022-11-25 9:23:12 0 [Note] WSREP: Recovered position: b6233aea-6bf2-11ed-bb03-8611a13b3b84:203,1-3-80 |
If I start it without "--wsrep_recovery" it starts normally and joins in the cluster. I cannot find the reason for the strange behavior, what did I miss?
Any advice is welcome.
Thank in advance