Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Error "Table "DBF_INDEX" already exists" #1299

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

julianzz98
Copy link
Contributor

@julianzz98 julianzz98 commented Mar 29, 2022

This PR includes a fix of the error "Table "DBF_INDEX" already exists" appearing when you change the workspace to i.e. the "deegree-workspace-utah". Origin of this error was an old database filename.

Changes were done and committed by @lgoltz.

Fixes #1297

@tfr42 tfr42 added the bug error issue and bug (fix) label Mar 30, 2022
Copy link
Member

@stephanr stephanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, there is still a potential for optimization, a metadata check would be helpful, but the current problem is solved.

@@ -304,7 +303,7 @@ ConnectionProvider createIndex()

connProvider = new LegacyConnectionProvider( "jdbc:h2:" + dbfile, "SA", "", false, null );

if ( new File( dbfile.toString() + ".h2.db" ).exists() ) {
if ( new File( dbfile.toString() + ".mv.db" ).exists() ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file naming strategy has been changed at h2.
This change leads to the fact that the detection of whether the table already exists fails because currently the existence of the table is assumed to be the same as the existence of the file.

@stephanr stephanr merged commit 5f327e0 into deegree:master Mar 30, 2022
@tfr42 tfr42 added this to the 3.4.28 milestone Apr 2, 2022
@lgoltz lgoltz deleted the fixShpTableAlreadyExists-8187-1297 branch December 8, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error issue and bug (fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "Table "DBF_INDEX" already exists" occurs in deegree-integration-tests
4 participants