stable

Clone or download

Read-only

fix: request #37184 User group binding ids can be confused with None value

Table `tracker_field_list_bind_ugroups_value` has its auto_increment starting from 1. If a list field bind to user group has the bad luck to have a binding id = 100, then when we set this field to None, it will understant an existing user group (not None). Table `tracker_field_list_bind_static_value` has its auto_increment starting from 101. Static list fields don't have the problem. So we "just" set the auto_increment initial value to 101. The forgeupgrade bucket alter the table to do the same thing, except that if current value is greater than 101 it will do nothing (see [mysql documentation][0]). We have discovered this bug from XTS db tests on ugroup list fields (see seeds in testing section). *Testing:* Run db tests with these seeds : 1709562924, 1709565973, 1709633803, 1709631460, 1709570791. Tests should pass [0]: https://dev.mysql.com/doc/refman/8.0/en/alter-table.html Change-Id: Ie2c59e7ed197f171c53b09dfb706cbcbe7837600

Modified Files

Name
M plugins/tracker/db/install.sql +1 −1 Go to diff View file
A plugins/tracker/db/mysql/updates/2024/202403051405_set_bind_ugroup_auto_increment.php +39 −0 Go to diff View file