Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.1
-
None
-
MariaDB source HEAD `c894d97781b5` (13.2.0-alpha) and the official image
`mariadb@sha256:dd9b303aed4f4890ed09f766d8ca9ddfd176c0c6f6267feff53b3192ec65a979`
(`12.3.3-MariaDB-ubu2404`)
Description
`UNINSTALL SONAME` resolves the plugin through the already-`dlopen`ed library list
(`plugin_dl_find`). If the `.so` file named in the `mysql.plugin` row no longer exists on
disk (removed package, moved plugin directory, upgraded server), the lookup fails and the
statement returns `ER_SP_DOES_NOT_EXIST` (`ERROR 1305 ... does not exist`) without
touching the `mysql.plugin` row. The orphan row then survives the uninstall.
The `UNINSTALL PLUGIN <name>` by-name path does remove the row, which is what the
MDEV-21258 fix addressed; the `UNINSTALL SONAME` path has no equivalent cleanup for the
missing-library case.
-
- Steps to reproduce (product observation)
On the official 12.3.3 image, insert an orphan plugin row (simulating a plugin whose
library file was removed) and try to uninstall it both ways:
```sql
INSERT INTO mysql.plugin (name, dl) VALUES ('ghost_plugin', 'ghost_plugin.so');
UNINSTALL SONAME 'ghost_plugin';
– ERROR 1305 (42000): SONAME ghost_plugin.so does not exist
SELECT COUNT
FROM mysql.plugin WHERE name = 'ghost_plugin'; – 1 (row still present)
UNINSTALL PLUGIN ghost_plugin;
– succeeds
SELECT COUNT
FROM mysql.plugin WHERE name = 'ghost_plugin'; – 0
```
Observed: after `UNINSTALL SONAME` the orphan row is still present (1 -> 1), while
`UNINSTALL PLUGIN` removes it (1 -> 0). Machine evidence:
`mariadb_reproduction_results/dsh_mdsh28_20261026_run1/result.json`, SHA-256
`4c6a7332b54e38aeb741f722edbb531c1c94e9d4b772b8d299b28d53704fc303`.
-
- Expected result
`UNINSTALL SONAME` should either remove the `mysql.plugin` row when the library cannot
be found (the plugin can no longer be used anyway), or report a state-aware error that
tells the operator to use `UNINSTALL PLUGIN <name>`; it should not leave the metadata in
a state where the name is unusable by SONAME and only removable by the alternate
statement.
Attachments
Issue Links
- relates to
-
MDEV-21258 Can't uninstall plugin if the library file doesn't exist
-
- Closed
-