On 4-8-2013 15:21, Mark Rotteveel wrote:
On 4-8-2013 14:39, Mark Rotteveel wrote:
Has anything changed in Firebird 3.0 with the stability of RDB$DB_KEY or
how RDB$DB_KEY works?

Jaybird uses RDB$DB_KEY to refresh (and update) rows in updatable
ResultSets, one of the tests now fails because it cannot find the row it
wants to refresh (it looks like the update fails as well, but the
current test refreshes the row before testing that).

It executes:
"SELECT RDB$DB_KEY,"ID","LONG_STR","STR","CamelStr"
FROM TEST_TABLE2 WHERE
RDB$DB_KEY = ?"

Where the parameter is set to:
sqltype = 453
sqlscale = 0
sqlsubtype = 1
sqllen = 8
sqldata =  { 0x81, 0, 0, 0, 0x1, 0, 0, 0 } (the same value as the dbkey
in the original query)

The executed query returns no rows, while it works under Firebird 2.5
(and earlier).

Mark


Interestingly, if I do a trace, I get the following:

Statement 145:
-------------------------------------------------------------------------------

SELECT RDB$DB_KEY,"ID","LONG_STR","STR","CamelStr"
FROM TEST_TABLE2 WHERE
RDB$DB_KEY = ?

param0 = varchar(8), "�"

Which is weird, as it shows an empty string and it indicates the
parameter is described as 453 (SQL_TEXT) or CHAR(8), not VARCHAR(8)

And with Firebird 2.5 trace shows:

Statement 204:
-------------------------------------------------------------------------------
SELECT RDB$DB_KEY,"ID","LONG_STR","STR","CamelStr"
FROM TEST_TABLE2 WHERE
RDB$DB_KEY = ?

param0 = char(8), "�"

Also no value, but it is correctly described as CHAR(8) and the query works. Does trace not display values in OCTETS?

Mark
--
Mark Rotteveel

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to