FirebirdSQL / NETProvider

Firebird ADO.NET Data Provider
https://www.firebirdsql.org/en/net-provider/
Other
159 stars 65 forks source link

"Implementation limit exceeded" after upgrading from 3.0.2.0 to 3.1.0.0 [DNET513] #496

Closed firebird-automations closed 11 years ago

firebird-automations commented 11 years ago

Submitted by: NoPyGod (nopygod)

Is duplicated by DNET514 Is related to DNET466 Relate to DNET518

Attachments: Databases.zip Setting.cs

With version 3.0.2.0, the following LINQ query

var isMaster = configDb.Settings.Where(x => x.Key == @"\ALPHA\ENVIRONMENT\MASTER").Single().Value == "1";

Was translated into

SELECT FIRST (2) "B"."CONFIGKEY" AS "CONFIGKEY", "B"."CONFIGVALUE" AS "CONFIGVALUE" FROM "CONFIGURATION" AS "B" WHERE _UTF8'\ALPHA\ENVIRONMENT\MASTER' = "B"."CONFIGKEY"

This works fine. Have been using the http://ADO.NET provider for months without any trouble

But today I tried to upgrade to version 3.1.0.0 of the provider, and now that same linq query is being translated into the SQL below

SELECT FIRST (2) "B"."CONFIGKEY" AS "CONFIGKEY", "B"."CONFIGVALUE" AS "CONFIGVALUE" FROM "CONFIGURATION" AS "B" WHERE CAST(_UTF8'\ALPHA\ENVIRONMENT\MASTER' AS VARCHAR(32765)) = "B"."CONFIGKEY"

Notice it now CASTs to VARCHAR(32765)

This unfortunately is giving an error:

Dynamic SQL Error SQL error code = -204 Data type unknown Implementation limit exceeded COLUMN DSQL internal

I tried executing the same sql query outside of .NET, from IBExpert, and it also gives the same error there.

I have tried so many different things in IBExpert to get this to work but to no avail. I discovered that if I export the table structure and create a new database and import the structure into a new table, I can run the query without problems. I thought this might mean there was a problem with the database so I did the usual gfix, backup restore but that hasn't helped.

I've attached a zip containing two databases, one which works and the one which doesn't. Please try running this query to see the error I'm referring to --

SELECT * FROM CONFIGURATION WHERE CONFIGKEY = CAST(_UTF8'TEST' AS VARCHAR(32765))

I don't know if this is a problem with the http://ADO.NET provider or with the Firebird engine itself, but since 3.0.2.0 worked and 3.1.0.0 doesn't I thought I'd report it here.

Commits: FirebirdSQL/NETProvider@ecb9fb1181c9f2d0b89f0d376e2c1b4f695f7fa2

firebird-automations commented 11 years ago
Modified by: NoPyGod (nopygod) Attachment: Databases\.zip \[ 12352 \]
firebird-automations commented 11 years ago
Modified by: NoPyGod (nopygod) Attachment: Setting\.cs \[ 12353 \]
firebird-automations commented 11 years ago

Commented by: @mrotteveel

For UTF8, the max VARCHAR size is 8191

firebird-automations commented 11 years ago

Commented by: @cincuranet

Interesting. Firebird-2.5.2.26539-0_x64 allows me to use 32k without a problem. :) Although yes, it needs to be changed to 8xxx probably.

firebird-automations commented 11 years ago
Modified by: @cincuranet Link: This issue is duplicated by [DNET514](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET514+in%3Atitle) \[ [DNET514](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET514+in%3Atitle) \]
firebird-automations commented 11 years ago

Commented by: Rand Random (rand.random)

How long does this take to fix, is it a matter of hours or is it more like I have to wait weeks/months? This version is kinda unuseable with this bug right now, thats why I am asking.

firebird-automations commented 11 years ago

Commented by: @cincuranet

Days.

firebird-automations commented 11 years ago

Commented by: Rand Random (rand.random)

Thx for the answer, hope to see a fix soon™.

firebird-automations commented 11 years ago

Commented by: Rand Random (rand.random)

Still no progress, ... :(

firebird-automations commented 11 years ago
Modified by: @cincuranet status: Open \[ 1 \] =\> Resolved \[ 5 \] resolution: Fixed \[ 1 \] Fix Version: vNext \[ 10570 \]
firebird-automations commented 11 years ago
Modified by: @cincuranet Link: This issue is related to [DNET466](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET466+in%3Atitle) \[ [DNET466](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET466+in%3Atitle) \]
firebird-automations commented 11 years ago
Modified by: @cincuranet Link: This issue relate to [DNET518](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET518+in%3Atitle) \[ [DNET518](https://github.com/FirebirdSQL/NETProvider/issues?q=DNET518+in%3Atitle) \]