[CONJ-909] createDatabaseIfNotExist doesn't work with Connector/J 3 Created: 2021-12-23  Updated: 2022-01-11  Resolved: 2022-01-11

Status: Closed
Project: MariaDB Connector/J
Component/s: question
Affects Version/s: 3.0.2-rc
Fix Version/s: 3.0.3

Type: Bug Priority: Major
Reporter: Oleg Alexeyev Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Looks like createDatabaseIfNotExist parameter, which was doing something like CREATE DATABASE IF NOT EXISTS, was dropped in v3.

While it shouldn't be used in prod, it comes in handy for tests. And workaround is a bit awkward - one needs to connect to a URL without schema (to avoid failure on USE) and execute CREATE DATABASE IF NOT EXISTS, then reconnect with schema in URL (to avoid executing USE manually).

It's also supported by Oracle MySQL driver and it would be nice if MariaDB one would be a drop-in replacement for it (what was the case with v2, and I must admit a great replacement!).

I wonder was it done on purpose, or it's just a missing feature at the moment?



 Comments   
Comment by Diego Dupin [ 2022-01-10 ]

there is no reason for not supporting it in 3.0, added in 3.0.3

Generated at Thu Feb 08 03:19:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.