Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
11.2.6, 11.4.4
-
None
Description
MariaDB 11.4.4 is removed const from get_foreign_key_list/get_parent_foreign_key_list by merging 10.11 to 11.2.
Addition const to get_foreign_key_list/get_parent_foreign_key_list committed https://github.com/MariaDB/server/commit/b3f988d2602d261aedeee63c0f5d8f3aba2ade5c#diff-1ce608c2a9731ad3adb799562b94ac165e3df6ca0b5e87cd61d6b9bbe1e06fc4R4434.
However, MariaDB 11.4.4 is removed by https://github.com/MariaDB/server/commit/12a91b57e27b979819924cf89614e6e51f24b37b.
Is it correct modification?
Attachments
Issue Links
- is caused by
-
MDEV-34392 modification of the column fails to check foreign key constraint
-
- Closed
-
Seems it was correct. Reapplying the same original patch and compiling:
home/dan/repos/mariadb-server-11.4/storage/innobase/handler/ha_innodb.cc:15529:29: error: cannot initialize a parameter of type 'THD *' with an lvalue of type 'const THD *'
15529 | f_key_info.set_nullable(thd, false, i,
| ^~~
/home/dan/repos/mariadb-server-11.4/sql/table.h:2026:26: note: passing argument to parameter 'thd' here
2026 | void set_nullable(THD *thd, bool referenced,
| ^
/home/dan/repos/mariadb-server-11.4/storage/innobase/handler/ha_innodb.cc:15540:29: error: cannot initialize a parameter of type 'THD *' with an lvalue of type 'const THD *'
15540 | f_key_info.set_nullable(thd, true, i,
| ^~~
/home/dan/repos/mariadb-server-11.4/sql/table.h:2026:26: note: passing argument to parameter 'thd' here
2026 | void set_nullable(THD *thd, bool referenced,
| ^
The set_nullable can call assign_nullable which ultimately allocated onto the mem_root of the THD which isn't const.