Issue Details (XML | Word | Printable)

Key: ODBC-55
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Viesturs Ducens
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

Garbage by serial update

Created: 15/Jan/09 08:24 AM   Updated: 04/Jan/14 01:24 PM
Component/s: None
Affects Version/s: 2.0 RC1
Fix Version/s: 2.0.3

File Attachments: 1. Zip Archive test.zip (7 kB)
2. Zip Archive trace.zip (10 kB)

Environment:
Server - FB 2.0.3, FB 2.1.1 (Windows & Linux)
Client - Windows XP, Windows 2000


 Description  « Hide
When multiple updates is running, (one time Prepare, multiple Executes), data base fields is filled with garbage from previous records.
Sample:
If SqlPrepare ('Update Table Set Field = xxxx')
   While Ok
        BindVariables
        SqlExecute ()

The first record seems to be Ok. If the value for next record is shorter, at the end of Field there are appended aditional characters from previous record. It seems, that it hasn't released some buffers between SqlExecutes.


 All   Comments   Change History   Subversion Commits      Sort Order: Descending order - Click to sort in ascending order
Viesturs Ducens added a comment - 20/Jan/09 09:01 AM
I have attached trace log file. I started test application 2 times - first with the MS SQL Server database, then the Firebird database. The log file I attached is one for both processes.
The results in MS SQL database are Ok, but in FB aren't.

About source code. These 2 lines of code are correct.. The first one set the variable sValue equal to 250 spaces, to be sure, there remains no garbage in my code. The second one sets sValue equal to diferent values, every one shorter by 1 as previous (00000, 1111, 222, ....). In all rows except first one remains something from previous rows (00000, 11110, 22210)

Ok, the situation is more complex while I don't work directly with ODBC, but through the connectivity subsystem of " Centura Team Developer - something like additional "ODBC driver". But why the results are correct in case of MS SQL, but aren't for Firebird ?
May be there is possible to get trace log file not only with SQL commands but with data too ?

Alexander Potapchenko added a comment - 19/Jan/09 03:38 PM
I can not reproduce it in C# with your database as yet.
You sure that problem not in code:
Set sValue = SalStrRepeatX (' ', 250)
Set sValue = SalStrRepeatX (SalNumberToChar (48+i), 30-i) ?
You can give me ODBC trace file (in ODBC DataSource Administrator) to make the picture complete.

Viesturs Ducens added a comment - 19/Jan/09 12:13 PM
There are files
test2.sql - database metadata
TEST2.gbk - database backup (FB 2.0.3)
test.txt - source code of test case

Viesturs Ducens added a comment - 19/Jan/09 11:14 AM
I will send the database metadata and fragment from my test source code.

Alexander Potapchenko added a comment - 19/Jan/09 11:11 AM
Well, I will try to reproduce it in C# or C++. But I want to look at the database metadata. Is it reproduced with VARCHAR columns?

Viesturs Ducens added a comment - 19/Jan/09 10:55 AM
It will be very difficult ;-( It is not C, but Centura Team Developer - very complex system.
My be there is possible to enable more extended debug or tracing, including data sent to and from server ?

Alexander Potapchenko added a comment - 19/Jan/09 07:24 AM
Can you give me your test case (C#, С++ or other) with a database metadata?

Viesturs Ducens added a comment - 19/Jan/09 05:14 AM
Have tried driver from 27.11.2008. The same effect - additional garbage symbols from previous record ;-(

Alexander Potapchenko added a comment - 15/Jan/09 06:57 PM
Please try driver from here: http://tracker.firebirdsql.org/browse/ODBC-50 and inform me about results.