[MDEV-30555] The server does not detect changes in NULL-ability of system table columns Created: 2023-02-03 Updated: 2023-02-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Data types |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If I change NULL-ability of the column mysql.proc.definer, it's still possible to create stored routins, however it's not possible to execute them. This MTR test demonstrates the problem. The test is for 10.6. To reproduce the problem in other versions, the data type varchar(384) in the ALTER statement should be modified according to the expected data type in this version.
The problem happens because in this code block:
there is no a Field::set_notnull() call. After changing the column NULL-ability, the value of the Field stays NULL. As the code RELIES on the fact that this Field is not NULL-able, it seems Table_check_intact::check() should catch not only data type difference, but also NULL-ability difference. The C++ structure TABLE_FIELD_TYPE which stores definitions of the system table columns could be extended by a new field responsible for NULL-ability:
|