| Bug #101336 | Exception if database name is part of stored procedure name | ||
|---|---|---|---|
| Submitted: | 27 Oct 2020 11:33 | Modified: | 27 Oct 2020 11:48 |
| Reporter: | Torsten Zachert | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 8.0.21 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | connector / net, stored procedure | ||
[27 Oct 2020 11:48]
MySQL Verification Team
Hello Torsten Zachert, Thank you for the report and feedback. Imho this is duplicate of Bug #100683( and related to Bug #100306 which is fixed in 8.0.22). regards, Umesh

Description: If I use the database name as part of the stored procedure name, than I get the error: Procedure or function '' cannot be found in database '`test_db`'. Verify that user 'root'@'localhost' has enough privileges to execute. Database name: test_db Stored procedure name: SP_test_db If I change the stored procedure name, everything works fine. How to repeat: CREATE database test_db; CREATE TABLE `testtable1` ( `id` int UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_test_db`() READS SQL DATA SELECT id FROM testtable1$$ DELIMITER ; using (MySqlConnection connection = new MySqlConnection(connectionString)) { using (MySqlCommand cmd = new MySqlCommand()) { connection.Open(); cmd.Connection = connection; cmd.CommandText = "SP_test_db"; cmd.CommandType = CommandType.StoredProcedure; var dataReader = cmd.ExecuteReader(); } }