@@ -7,9 +7,10 @@ use super::{
77 show_client_memory:: ShowClientMemory , show_clients:: ShowClients , show_config:: ShowConfig ,
88 show_instance_id:: ShowInstanceId , show_lists:: ShowLists , show_mirrors:: ShowMirrors ,
99 show_peers:: ShowPeers , show_pools:: ShowPools , show_prepared_statements:: ShowPreparedStatements ,
10- show_query_cache:: ShowQueryCache , show_server_memory:: ShowServerMemory ,
11- show_servers:: ShowServers , show_stats:: ShowStats , show_transactions:: ShowTransactions ,
12- show_version:: ShowVersion , shutdown:: Shutdown , Command , Error ,
10+ show_query_cache:: ShowQueryCache , show_replication:: ShowReplication ,
11+ show_server_memory:: ShowServerMemory , show_servers:: ShowServers , show_stats:: ShowStats ,
12+ show_transactions:: ShowTransactions , show_version:: ShowVersion , shutdown:: Shutdown , Command ,
13+ Error ,
1314} ;
1415
1516use tracing:: debug;
@@ -35,6 +36,7 @@ pub enum ParseResult {
3536 Shutdown ( Shutdown ) ,
3637 ShowLists ( ShowLists ) ,
3738 ShowPrepared ( ShowPreparedStatements ) ,
39+ ShowReplication ( ShowReplication ) ,
3840 ShowServerMemory ( ShowServerMemory ) ,
3941 ShowClientMemory ( ShowClientMemory ) ,
4042 Set ( Set ) ,
@@ -69,6 +71,7 @@ impl ParseResult {
6971 Shutdown ( shutdown) => shutdown. execute ( ) . await ,
7072 ShowLists ( show_lists) => show_lists. execute ( ) . await ,
7173 ShowPrepared ( cmd) => cmd. execute ( ) . await ,
74+ ShowReplication ( show_replication) => show_replication. execute ( ) . await ,
7275 ShowServerMemory ( show_server_memory) => show_server_memory. execute ( ) . await ,
7376 ShowClientMemory ( show_client_memory) => show_client_memory. execute ( ) . await ,
7477 Set ( set) => set. execute ( ) . await ,
@@ -103,6 +106,7 @@ impl ParseResult {
103106 Shutdown ( shutdown) => shutdown. name ( ) ,
104107 ShowLists ( show_lists) => show_lists. name ( ) ,
105108 ShowPrepared ( show) => show. name ( ) ,
109+ ShowReplication ( show_replication) => show_replication. name ( ) ,
106110 ShowServerMemory ( show_server_memory) => show_server_memory. name ( ) ,
107111 ShowClientMemory ( show_client_memory) => show_client_memory. name ( ) ,
108112 Set ( set) => set. name ( ) ,
@@ -158,6 +162,7 @@ impl Parser {
158162 "instance_id" => ParseResult :: ShowInstanceId ( ShowInstanceId :: parse ( & sql) ?) ,
159163 "lists" => ParseResult :: ShowLists ( ShowLists :: parse ( & sql) ?) ,
160164 "prepared" => ParseResult :: ShowPrepared ( ShowPreparedStatements :: parse ( & sql) ?) ,
165+ "replication" => ParseResult :: ShowReplication ( ShowReplication :: parse ( & sql) ?) ,
161166 command => {
162167 debug ! ( "unknown admin show command: '{}'" , command) ;
163168 return Err ( Error :: Syntax ) ;
0 commit comments