From: Roman R. <rro...@us...> - 2003-01-31 23:24:03
|
Hi, I was debugging a bug that was reported in Firebird-Java group, and seems to me that I have found a bug in remote protocol implementation of batched fetches. However, one can reproduce it only with a view, that from my point of view is incorrect. How-to for reproducing the bug: CREATE TABLE test_table(id INTEGER); /* Note, SELECT contains two single quotes, not one double quote */ CREATE VIEW test_view(id, empty_char) AS SELECT id, '' FROM test_table; INSERT INTO test_table VALUES(0); INSERT INTO test_table VALUES(1); INSERT INTO test_table VALUES(2); INSERT INTO test_table VALUES(3); INSERT INTO test_table VALUES(4); INSERT INTO test_table VALUES(5); INSERT INTO test_table VALUES(6); INSERT INTO test_table VALUES(7); INSERT INTO test_table VALUES(8); INSERT INTO test_table VALUES(9); Now, if you do SELECT * FROM test_view, JayBird fetches only 1 row, QuickDesk shows message about incorrect values in XSQLDA structure, IBConsole correctly fetches 10 rows. However, if view is chaged to CREATE VIEW test_view(id, empty_char) AS SELECT id, CAST('' AS CHAR(1)) FROM test_table; everything works fine. First view definition seems to be incorrect, because server is not able to determine what type this empty string should be. And this uncertainty seems to cause problem when fetches are batched. Best regards, Roman Rokytskyy __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com |