RaigorJiang opened a new pull request #13341: URL: https://github.com/apache/shardingsphere/pull/13341
For #11762, #12444 ## Background In MySQL, result set of `show tables` contains 2 columns: ```sql mysql> SHOW FULL TABLES FROM `demo_ds_0`; +---------------------+------------+ | Tables_in_demo_ds_0 | Table_type | +---------------------+------------+ | t_order | BASE TABLE | +---------------------+------------+ 1 row in set (0.00 sec) ``` But in ShardingSphere-Proxy, `show tables` just returns 1 column: ```sql mysql> show full tables from `sharding_db`; +-----------------------+ | Tables_in_sharding_db | +-----------------------+ | t_order | +-----------------------+ 1 row in set (0.01 sec) ``` When users use MySQLWorkbench to connect the Proxy, MySQLWorkbench will get the table information by execute a SQL `show full tables from sharding_db;`, because the missing column `Table_type`, an exception occurs in it. Similarly, MySQLWorkbench will execute the following SQL to obtain the information required by the user interface: - SHOW PROCEDURE STATUS WHERE Db='sharding_db'; - SHOW FUNCTION STATUS WHERE Db='sharding_db' ## Changes proposed in this pull request: - Improve `show tables` result set, add column `Table_type`. - Add `MySQLShowProcedureStatusStatement` and `ShowProcedureStatusExecutor`, but return empty result set. - Add `MySQLShowFunctionStatusStatement` and `ShowFunctionStatusExecutor`, but return empty result set. ## Before Change ```sql mysql> show full tables from `sharding_db`; +-----------------------+ | Tables_in_sharding_db | +-----------------------+ | t_order | +-----------------------+ 1 row in set (0.01 sec) ``` <img width="813" alt="before" src="https://user-images.githubusercontent.com/5668787/139292592-0844ea97-11b2-4bf9-b74a-42519bbc413c.png"> ## After Change ```sql mysql> show full tables from `sharding_db`; +-----------------------+------------+ | Tables_in_sharding_db | Table_type | +-----------------------+------------+ | t_order | BASE TABLE | +-----------------------+------------+ 1 row in set (0.01 sec) ``` <img width="811" alt="after" src="https://user-images.githubusercontent.com/5668787/139292682-32322faa-f78e-4102-b4fe-4428e5128089.png"> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
