Minimal reproducible test case for Devart.Data.Oracle.EFCore 11.0.0 bug that generates malformed SQL with trailing END; statement during concurrent SaveChanges operations.
When multiple threads perform concurrent updates on related entities (TestEntity and TestSubscriptionEntity) with EF Core transactions, Devart's provider generates SQL with a trailing END; token without a corresponding BEGIN, causing ORA-00933.
Key Evidence:
- EF Core generates correct SQL (proven by DbCommandInterceptor logs - no
END;present) - Oracle throws ORA-00933 (SQL command not properly ended)
- Therefore: Devart provider adds malformed
END;internally between EF and Oracle execution
- .NET 9.0
- Microsoft.EntityFrameworkCore 9.0.11
- Devart.Data.Oracle.EFCore 11.0.0.9
- Oracle database (19c or compatible)
- Connection string with valid credentials
Set environment variable (or edit hardcoded value in Program.cs):
$env:DEVART_ORACLE_CONN = 'Host=localhost;Port=1521;User ID=youruser;Password=yourpwd;Service Name=ORCL19PDB1;Direct=true;'dotnet run --project Repro/DevartOracleRepro/DevartOracleRepro.csproj -- ensure-dbThis creates two tables:
TestEntities- contains test data (Id, Content, CreationTime, Reference, Revision)TestSubscriptions- related subscription entity (Id, LastChange, SomeProperty)
And inserts one seed record for testing.
dotnet run --project Repro/DevartOracleRepro/DevartOracleRepro.csproj -- fuzz --count 100 --concurrency 5Parameters:
--count N- number of total update iterations (default: 50)--concurrency M- number of concurrent workers (default: 5)
The fuzz command runs concurrent update operations that modify both TestEntity.Content and TestSubscriptionEntity.LastChange in a single SaveChanges call.
Within 10-100 iterations, you should see:
!!!!!!!!!! [workerN-iterM] FAILED - THIS IS THE TRIGGER !!!!!!!!!!!!
...
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes.
---> Devart.Data.Oracle.OracleException (0x80004005): ORA-00933: SQL command not properly ended
Scroll up in the console to find the [Interceptor] logs immediately before the failure - they show clean SQL without END;, proving the bug is in Devart's provider.
- ✅ EF Core SQL generation is correct (interceptor shows no
END;) - ✅ Oracle rejects the SQL with ORA-00933
- ✅ Devart provider adds malformed
END;internally - ✅ Bug triggered by concurrent transactions
Program.cs- minimal repro with TestEntity/TestSubscriptionEntity models, DbContext, and fuzz testDevartOracleRepro.csproj- project file with package referencesREADME.md- this file
Summary: Devart.Data.Oracle.EFCore 11.0.0.9 generates malformed SQL (trailing END; without BEGIN) during concurrent SaveChanges operations with transactions. EF Core DbCommandInterceptor logs prove EF generates correct SQL, but Devart's internal execution adds the malformed statement, causing ORA-00933.
Attach:
- This entire repro project (zip)
- Console output showing interceptor logs (clean SQL) + ORA-00933 exception
- Steps to reproduce (above)