Our bamboo instance has corruption like that described on the linked support page|https://confluence.atlassian.com/pages/viewpage.action?pageId=280694356 .
While testing the sql queries suggested there, I encountered some errors that indicate we are using different schema. It seems likely that the queries on that page were developed for a different version of Bamboo. We are running Bamboo 3.4.4.
I'll show below the queries we had trouble with and the errors that resulted. Note that these queries were modified to show the bad rows rather than delete them. (Please note also that, in contrast to the support page, our mysql database requires the table names be specified in UPPERCASE):
bq. select * from USER_COMMIT WHERE BUILDRESULTSUMMARY_ID NOT IN (SELECT BUILDRESULTSUMMARY_ID FROM BUILDRESULTSUMMARY);
bq. ERROR 1054 (42S22) at line 1: Unknown column 'BUILDRESULTSUMMARY_ID' in 'IN/ALL/ANY subquery'
bq. select * from COMMIT_FILES WHERE COMMIT_ID in (select COMMIT_ID from USER_COMMIT where BUILDRESULTSUMMARY_ID not IN (SELECT BUILDRESULTSUMMARY_ID FROM BUILDRESULTSUMMARY));
bq. ERROR 1054 (42S22) at line 1: Unknown column 'BUILDRESULTSUMMARY_ID' in 'IN/ALL/ANY subquery'
The problem is apparently that our USER_COMMIT table is different from what is shown on the figure on the support page:
{quote}
mysql> describe USER_COMMIT;
|| Field || Type || Null|| Key|| Default|| Extra||
| COMMIT_ID | bigint(20) | NO | PRI | 0 | |
| AUTHOR_ID | bigint(20) | YES | MUL | NULL | |
| COMMIT_DATE | datetime | YES | | NULL | |
| COMMIT_COMMENT_CLOB | longtext | YES | | NULL | |
| REPOSITORY_CHANGESET_ID | bigint(20) | YES | MUL | NULL | |
| COMMIT_REVISION | varchar(4000) | YES | MUL | NULL | |
6 rows in set (0.00 sec)
{quote}
As you can see, it doesn't have a BUILDRESULTSUMMARY_ID field.
Please advise what sql queries we should run to ensure everything is cleaned up as it should be. Should we just skip the deletions corresponding to these two queries, or are alternate queries needed?
Thank you,
Ed Segall