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

Attempting to recreate tables that already exist with DatabaseMatcher #72

Open
JustTalDevelops opened this issue May 7, 2024 · 1 comment

Comments

@JustTalDevelops
Copy link

Class.forName("com.mysql.cj.jdbc.Driver").newInstance();

var conn = DriverManager.getConnection(...);

imageMatcher = new DatabaseImageMatcher(conn);
imageMatcher.addHashingAlgorithm(hasher, 1);

Doing this first causes the library to throw the following exception:

java.sql.SQLSyntaxErrorException: Table 'WaveletHash89644008' already exists

On subsequent restarts, this also seems to happen on the main table:

java.sql.SQLSyntaxErrorException: Table 'ImageHasher' already exists
@JustTalDevelops
Copy link
Author

image

Looking at the code, it seems to be coming from this function making the table name uppercase before checking if it exists. Passing the name as is seems to return the expected output here. Any idea why this is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant