[ZBX-13498] mysql db may get duplicated index c_problem_2 for "problem" table Created: 2018 Feb 19 Updated: 2024 Apr 10 Resolved: 2018 Feb 23 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 3.4.8rc1, 4.0.0alpha4, 4.0 (plan) |
Type: | Problem report | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | Vladislavs Sokurenko |
Resolution: | Fixed | Votes: | 0 |
Labels: | dbpatches, mysql, upgrade | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Team: | Team A |
Sprint: | Sprint 28 |
Story Points: | 0.5 |
Description |
This is followup of Background: What interesting I discovered is: But, if once after upgrade to 3.2, I had to dump and restore my zabbix database - the attempt to create the new index will be done "as is", and I'll get two identical indexes - c_problem_2 and problem_2. It's suggested to improve the patch logic to in a way to rename existing index. |
Comments |
Comment by Vladislavs Sokurenko [ 2018 Feb 20 ] |
Thanks! I can reproduce the issue when using mysqldump. |
Comment by Vladislavs Sokurenko [ 2018 Feb 20 ] |
Fixed in development branch: |
Comment by Oleksii Zagorskyi [ 2018 Feb 20 ] |
So, you have decided to just drop possibly existing duplicated index. What is not very good, that it's possible that on upgrade (even minor one), the index may be created and then dropped. The table may be not so small in production, so those operations may take some time. Don't you want to implement existing index renaming? vso It is done as MySQL manual states
unfortunately patch is already out, not sure if it is wise to change old patch. |
Comment by Andris Mednis [ 2018 Feb 21 ] |
Successfully tested. |
Comment by Vladislavs Sokurenko [ 2018 Feb 22 ] |
Fixed in:
|