[MDEV-22699] Strange effect when creating&calling a procedure after changing character_set_database Created: 2020-05-25 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Stored routines |
| Affects Version/s: | 10.1, 10.1.44, 10.4.13, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Description |
|
When changing the character_set_database variables value, and then creating a stored procedure with a VARCHAR parameter with COLLATE but without CHARACTER SET, calling the procedure leads to ERROR 1457 (HY000): Failed to load routine test.p1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) The mysql.proc table is not corrupted, and there are no messages in the error log. Test case (assuming that the 'test' database was created with default 'latin1' character set:
I know that character_set_database should never be changed (that thing should have been a STATUS value, not a VARIABLE, to begin with IMHO), and that COLLATE without CHARACTER SET is rarely a good idea. Yet the error message, and even the extra line in the warning, can be quite confusing, esp. if CREATE and CALL are not happening closely together ... |