MariaDB 10.2 introduced an issue where an automatic check constraint is
applied to boolean columns and is not automatically updated on a column
rename alter operation[1]. A similar issue preventing dropping such a
column was already fixed[2], so this patch changes the migration to drop
and readd the column instead of attempting a column rename.
Unfortunately since the mistake was already made, it is possible for
deployments out in the wild to have made it past the expand step and be
currently stuck in the contract step. To accomodate them, we add the new
column as part of the contract step if necessary. Again, since there
should be no data in this table, we don't need to worry about online
upgrades here.
Reviewed: https:/ /review. openstack. org/536869 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=59b1aacdbab a72df62167793ea 2b3ed2ba5b303f
Committed: https:/
Submitter: Zuul
Branch: master
commit 59b1aacdbaba72d f62167793ea2b3e d2ba5b303f
Author: Colleen Murphy <email address hidden>
Date: Tue Jan 23 16:36:15 2018 +0100
Fix column rename migration for mariadb 10.2
MariaDB 10.2 introduced an issue where an automatic check constraint is
applied to boolean columns and is not automatically updated on a column
rename alter operation[1]. A similar issue preventing dropping such a
column was already fixed[2], so this patch changes the migration to drop
and readd the column instead of attempting a column rename.
Unfortunately since the mistake was already made, it is possible for
deployments out in the wild to have made it past the expand step and be
currently stuck in the contract step. To accomodate them, we add the new
column as part of the contract step if necessary. Again, since there
should be no data in this table, we don't need to worry about online
upgrades here.
[1] https:/ /jira.mariadb. org/browse/ MDEV-13508 /jira.mariadb. org/browse/ MDEV-11114
[2] https:/
Change-Id: Icbd58464182b08 2854fb5d73ccc93 c900ede020c
Closes-bug: #1744948