Closed HugoLePoisson closed 10 months ago
thanks a lot for reporting it @HugoLePoisson
Let me try to fix it
Can you help me @jeroiraz for figuring out where createDatabase
lower their name?
Or just I lower the string directly in https://github.com/codenotary/immudb/blob/4b1d3b1c7bcbf5b34425ea1e0b4bd47d6051c5c4/test/document_storage_tests/documents_tests/actions/session.go#L28 ?
Can you help me @jeroiraz for figuring out where
createDatabase
lower their name?? Or just I lower the string directly in
?
thanks @rubiagatra
The fix may need to be done In server package: https://github.com/codenotary/immudb/blob/4b1d3b1c7bcbf5b34425ea1e0b4bd47d6051c5c4/pkg/server/session.go#L31
After checking the request is not nil
, the database name attribute may be force to lower case...
I already made the PR #1839 let me know what you think @jeroiraz, Thank you!
What happened I'm currently using the SDK immudb4j. I tried to open a session (defaultdb, immudb, immudb). Then create a new database. Close the session. And open a new one with the new DB.
immuClient.openSession("defaultdb", "immudb", "immudb");
immuClient.createDatabase("hG82t45Plm", true);
immuClient.closeSession();
immuClient.openSession("hG82t45Plm", "immudb", "immudb");
Database name are case sensitive or more precisely the are create in lowercase The createDatabase method lower the string "hG82t45Plm" But the openSession method does not So there is an Exception : UNKNOWN: database does not exist
What you expected to happen
I do not really know if it is a bug or not but we can expect the method openSession, as the createDatabase, lower the Database name field.
How to reproduce it (as minimally and precisely as possible)
Environment
Additional info (any other context about the problem)