File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ # On node_1
2
+ CREATE SERVER s1
3
+ FOREIGN DATA WRAPPER mysql
4
+ OPTIONS (HOST 'foo');
5
+ # On node_2
6
+ SELECT * FROM mysql.servers;
7
+ Server_name Host Db Username Password Port Socket Wrapper Owner
8
+ s1 foo 3306 mysql
9
+ ALTER SERVER s1
10
+ OPTIONS (HOST 'bar');
11
+ # On node_1
12
+ SELECT * FROM mysql.servers;
13
+ Server_name Host Db Username Password Port Socket Wrapper Owner
14
+ s1 bar 3306 mysql
15
+ DROP SERVER s1;
16
+ # On node_2
17
+ SELECT COUNT(*)=0 FROM mysql.servers;
18
+ COUNT(*)=0
19
+ 1
20
+ # End of test
Original file line number Diff line number Diff line change
1
+ # Test for CREATE/ALTER/DROP SERVER in Galera cluster
2
+
3
+ --source include/galera_cluster.inc
4
+
5
+ --connection node_1
6
+ --echo # On node_1
7
+ CREATE SERVER s1
8
+ FOREIGN DATA WRAPPER mysql
9
+ OPTIONS (HOST 'foo');
10
+
11
+ --connection node_2
12
+ --echo # On node_2
13
+ SELECT * FROM mysql.servers;
14
+ ALTER SERVER s1
15
+ OPTIONS (HOST 'bar');
16
+
17
+ --connection node_1
18
+ --echo # On node_1
19
+ SELECT * FROM mysql.servers;
20
+ DROP SERVER s1;
21
+
22
+ --connection node_2
23
+ --echo # On node_2
24
+ SELECT COUNT(*)=0 FROM mysql.servers;
25
+
26
+ --source include/galera_end.inc
27
+ --echo # End of test
28
+
Original file line number Diff line number Diff line change @@ -5649,6 +5649,8 @@ mysql_execute_command(THD *thd)
5649
5649
if (check_global_access (thd, SUPER_ACL))
5650
5650
break ;
5651
5651
5652
+ WSREP_TO_ISOLATION_BEGIN (WSREP_MYSQL_DB, NULL , NULL )
5653
+
5652
5654
res= create_server (thd, &lex->server_options );
5653
5655
break ;
5654
5656
}
@@ -5660,6 +5662,8 @@ mysql_execute_command(THD *thd)
5660
5662
if (check_global_access (thd, SUPER_ACL))
5661
5663
break ;
5662
5664
5665
+ WSREP_TO_ISOLATION_BEGIN (WSREP_MYSQL_DB, NULL , NULL )
5666
+
5663
5667
if ((error= alter_server (thd, &lex->server_options )))
5664
5668
{
5665
5669
DBUG_PRINT (" info" , (" problem altering server <%s>" ,
@@ -5678,6 +5682,8 @@ mysql_execute_command(THD *thd)
5678
5682
if (check_global_access (thd, SUPER_ACL))
5679
5683
break ;
5680
5684
5685
+ WSREP_TO_ISOLATION_BEGIN (WSREP_MYSQL_DB, NULL , NULL )
5686
+
5681
5687
if ((err_code= drop_server (thd, &lex->server_options )))
5682
5688
{
5683
5689
if (! lex->if_exists () && err_code == ER_FOREIGN_SERVER_DOESNT_EXIST)
You can’t perform that action at this time.
0 commit comments