Skip to content

andreaskasc/DevArtBugTestProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devart Oracle ORA-00933 Repro

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.

Issue Summary

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

Package Versions

  • .NET 9.0
  • Microsoft.EntityFrameworkCore 9.0.11
  • Devart.Data.Oracle.EFCore 11.0.0.9

Prerequisites

  • Oracle database (19c or compatible)
  • Connection string with valid credentials

Setup & Reproduce

1. Configure connection string

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;'

2. Create database schema and seed data

dotnet run --project Repro/DevartOracleRepro/DevartOracleRepro.csproj -- ensure-db

This 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.

3. Trigger the bug

dotnet run --project Repro/DevartOracleRepro/DevartOracleRepro.csproj -- fuzz --count 100 --concurrency 5

Parameters:

  • --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.

Expected Result

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.

What This Proves

  1. ✅ EF Core SQL generation is correct (interceptor shows no END;)
  2. ✅ Oracle rejects the SQL with ORA-00933
  3. ✅ Devart provider adds malformed END; internally
  4. ✅ Bug triggered by concurrent transactions

Files Included

  • Program.cs - minimal repro with TestEntity/TestSubscriptionEntity models, DbContext, and fuzz test
  • DevartOracleRepro.csproj - project file with package references
  • README.md - this file

For Devart Support

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:

  1. This entire repro project (zip)
  2. Console output showing interceptor logs (clean SQL) + ORA-00933 exception
  3. Steps to reproduce (above)

About

Test Project for DevArt Bug Support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages