Closed firebird-automations closed 11 years ago
Commented by: @mrotteveel
For UTF8, the max VARCHAR size is 8191
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.
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.
Commented by: @cincuranet
Days.
Commented by: Rand Random (rand.random)
Thx for the answer, hope to see a fix soon™.
Commented by: Rand Random (rand.random)
Still no progress, ... :(
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