Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379323

Summary: PostgresCatalogDatabase.refresh() implemented incorrectly
Product: [Tools] Data Tools Reporter: Brian Vosburgh <brian.vosburgh>
Component: EnablementAssignee: Pierre Queinnec <pierre.queinnec>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pierre.queinnec
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Brian Vosburgh CLA 2012-05-11 18:15:49 EDT
The method PostgresCatalogDatabase.refresh() is implemented incorrectly. It must call super.refresh() and, as a result, need *not* call RefreshManager.referesh(...).

Since super.refresh() is not called, the database's catalogs are never reloaded, leading to some failed Dali tests.

Unfortunately, WTP is not on Git yet; so I'm not set up to give you a patch; but the modified method should look like this:

	public void refresh() {
		synchronized (AUTHORIZATION_IDS_LOCK) {
			if (authorizationIdsLoaded.booleanValue()) {
				authorizationIdsLoaded = Boolean.FALSE;
			}
		}

		super.refresh();
	}

It appears this regression (i.e. refresh() *used* to work with a PostgreSQL database) occurred with the changes associated with bug 359861.
Comment 1 Pierre Queinnec CLA 2012-05-16 12:33:55 EDT
Hi Brian,

You're right. I'll address this shortly. By the way, I notice the MySQL enablement does the same thing. Do you also see the problem with MySQL?
Comment 2 Pierre Queinnec CLA 2012-05-16 12:53:27 EDT
Committed and pushed for Postgres. See http://git.eclipse.org/c/datatools/org.eclipse.datatools.enablement.postgresql.git/commit/?id=4ca98c58b0664950d12a35ed9558c75453a78fff

I didn't touch the MySQL part; please tell me from the Dali point of view if we should also correct it.
Comment 3 Brian Vosburgh CLA 2012-05-16 12:54:14 EDT
There plenty of problems with MySQL. :-) See the following:
bug 279721
bug 279726
bug 201957
bug 249013