Parametrized queries using RDB$DB_KEY do not work -------------------------------------------------
Key: CORE-4255 URL: http://tracker.firebirdsql.org/browse/CORE-4255 Project: Firebird Core Issue Type: Bug Components: API / Client Library, Engine Affects Versions: 3.0 Alpha 1 Environment: Jaybird 2.2.4-SNAPSHOT (HEAD of Branch_2_2) on Java 7 Update 45 against WI-T3.0.0.30566 Firebird 3.0 Alpha 1 Reporter: Mark Rotteveel Parametrized queries using RDB$DB_KEY do not work. Jaybird uses this for updatable resultsets when there is no primary key. When a cast to CHAR(8), VARCHAR(8) (with or without OCTETS) is added to the relevant code it works. This works without problem on Firebird 2.5 and earlier. The interesting thing is that the sqlvar describes the parameter as SQL_TEXT (or CHAR): sqltype = 453 sqlscale = 0 sqlsubtype = 1 sqllen = 8 However a trace shows the parameter as VARCHAR(8), which seems to indicate some kind invalid conversion is occurring with either the parameter itself or the received argument. Statement 145: ------------------------------------------------------------------------------- SELECT RDB$DB_KEY,"ID","LONG_STR","STR","CamelStr" FROM TEST_TABLE2 WHERE RDB$DB_KEY = ? param0 = varchar(8), "" Same test executed on Firebird 2.5: Statement 204: ------------------------------------------------------------------------------- SELECT RDB$DB_KEY,"ID","LONG_STR","STR","CamelStr" FROM TEST_TABLE2 WHERE RDB$DB_KEY = ? param0 = char(8), "" -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel