[MDEV-15786] ERROR 1062 (23000) at line 365: Duplicate entry 'spider' for key 'PRIMARY' Created: 2018-04-05 Updated: 2018-08-30 Resolved: 2018-07-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.2.14 |
| Fix Version/s: | 10.2.17, 10.3.9, 10.4.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dermot Brereton | Assignee: | Jacob Mathew (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 16.04 xenial |
||
| Description |
|
Reinstalling the spider plugin after a MariaDB 10.2.13 - - > 10.2.14 upgrade fails with the following error;
|
| Comments |
| Comment by Elena Stepanova [ 2018-05-30 ] | ||||||
|
What do you mean by reinstalling? What was the exact sequence of events? | ||||||
| Comment by Dermot Brereton [ 2018-05-31 ] | ||||||
|
Sequence of steps. 1.) Upgraded MariaDB database server (with spider engine installed) from version 10.2.13 to 10.2.14 following the steps recommended in 2.) Reinstalling the spider storage engine post-upgrade fails with the error; | ||||||
| Comment by Elena Stepanova [ 2018-05-31 ] | ||||||
|
Okay, let me be more precise. Please provide the exact sequence of command lines that you used for (1) and (2). Thanks. | ||||||
| Comment by Dermot Brereton [ 2018-05-31 ] | ||||||
|
1.) Steps to deinstall & reinstall MariaDB server 10.2 (spider engine already installed) 2.) Steps to reinstall the spider storage engine. Unpacking mariadb-plugin-spider (10.2.14+maria~xenial) ... | ||||||
| Comment by Elena Stepanova [ 2018-07-19 ] | ||||||
|
Unfortunately, this algorithm doesn't work. 1) apt-get remove --purge mysql-server mysql-client mysql-common does remove the server (and actually all mariadb packages), simply because everything depends on mysql-common, and is removed as a dependency. mysql-server and mysql-client are of course not recognized; 2) regardless of (1): even apt-get remove --purge mariadb-server mariadb-client mysql-common (or apt-get purge mariadb-server mariadb-client mysql-common) does not remove /var/lib/mysql, at some point during the process it says this:
and indeed doesn't remove it; however it completely removes all packages, so you can't run purge again afterwards (and subsequent autoremove doesn't purge anything either); 3) when one runs a "normal" remove, like sudo apt-get remove mariadb-server mariadb-client mariadb-common mysql-common, the packages are removed, but they leave
and if you run sudo apt-get purge mariadb-client-10.2 mariadb-common mariadb-server-10.2 mysql-common afterwards – that's when the /var/lib/mysql gets removed, with a big shiny warning dialog. I'm reassigning it to otto, the debian packaging expect, to determine if the above is expected behavior, and if not, fix it. Dermot.Brereton, | ||||||
| Comment by Sergei Golubchik [ 2018-07-19 ] | ||||||
|
jacob-mathew, could you please fix spider install script not to fail when spider is already present in the mysql.plugin table? | ||||||
| Comment by Jacob Mathew (Inactive) [ 2018-07-20 ] | ||||||
|
The Spider install script installs Spider in mysql.plugin only if it is not already present in INFORMATION_SCHEMA.plugins. It is indeed possible to run the script repeatedly without failures. Note that the error that would occur upon attempting to install Spider when Spider is already installed is the following:
| ||||||
| Comment by Elena Stepanova [ 2018-07-20 ] | ||||||
|
jacob-mathew, | ||||||
| Comment by Jacob Mathew (Inactive) [ 2018-07-21 ] | ||||||
|
I now understand the inconsistency that results after upgrades to MariaDB and Spider on Ubuntu. I was able to artifcially create this situation on my development machine and verified that the reported error occurs upon re-installing Spider. I have fixed the problem by making changes to the Spider installation script for recognizing and correcting the inconsistency. | ||||||
| Comment by Jacob Mathew (Inactive) [ 2018-07-21 ] | ||||||
|
Kentoku, please review my fix for this problem in commit 0897d81 on my branch. | ||||||
| Comment by Kentoku Shiba (Inactive) [ 2018-07-23 ] | ||||||
|
LGTM | ||||||
| Comment by Jacob Mathew (Inactive) [ 2018-07-23 ] | ||||||
|
Fix is pushed to 10.3 and 10.2. |