[MDEV-27124] mariadb-update definer of Add/DropGeometryColumn procedures from 'root' to 'mariadb.sys' Created: 2021-11-25  Updated: 2021-11-26  Resolved: 2021-11-26

Status: Closed
Project: MariaDB Server
Component/s: Upgrades
Affects Version/s: 10.4
Fix Version/s: 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23102 10.4 create mariadb.sys user on each ... Closed

 Description   

from: https://github.com/MariaDB/server/pull/1936

From 10.4.13, the mariadb.sys user was created to replace root definers.

In commit 0253ea7, definer of Add/DropGeometryColumn procedures was changed to mariadb.sys, in scripts/maria_add_gis_sp.sql.in.

However, maria_add_gis_sp.sql only applies to new databases created by
installation script. Databases upgraded from old versions will miss this
change. In addition, according to commit 0d6d801(MDEV-23102), in some scenarios
when root user is replaced it will skip creating mariadb.sys user.

This commit is to update the definer from root to mariadb.sys during
upgrade. It only makes the change if the original definers are root.

Doesn't choose to execute maria_add_gis_sp.sql in upgrade script to
recreate the procedures is because of considering the scenarios of
MDEV-23102 that root user is replaced and mariadb.sys is not created.


Generated at Thu Feb 08 09:50:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.