You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(jdbc): fold transaction modes and table types with Locale.ROOT #286
TransactionMode.from and MetadataSql call toUpperCase() without a locale. Under a Turkish default locale, "immediate" folds to "İMMEDİATE", so TransactionMode.from("immediate") throws IllegalArgumentException. MetadataSql folds TABLE_TYPE values the same way, so getTables(..., new String[] {"VIEW"}) builds a predicate that matches nothing.
The probe ran against the built classes during the independent verification of #285. The full result is in #285 (comment).
Sites
LibsqlConnection.java:99 uses mode.toUpperCase().
MetadataSql.java:36 uses types[i].toUpperCase().
Fix
Use Locale.ROOT at both sites. This is the same policy as the rest of the driver after #283.
Pins
A test that sets Locale.setDefault(Locale.forLanguageTag("tr")) and asserts TransactionMode.from("immediate") returns IMMEDIATE and from("exclusive") returns EXCLUSIVE.
A test that builds the getTables predicate under the same default and asserts the VIEW type literal is VIEW.
Add restrict or no action to the ForeignKeyMetadata locale pin in LocaleFoldingTest, so the FK call site is mutation-sensitive too. The current cascade and set null cases contain no Turkish-sensitive letter.
Acceptance
Both sites use Locale.ROOT.
The new tests fail under the Turkish default before the fix and pass after it.
./mvnw -pl libsql-jdbc -am test is green.
./mvnw spotless:check is green.
Public API, exception types, and messages are unchanged.
Activity
refactor(jdbc): use Locale.ROOT for every case-folding call site (#285)