Issue Details (XML | Word | Printable)

Key: CORE-1416
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Kuznetsov Eugene
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Incorrect transaction params order in TPB is accepted without returning an error

Created: 18/Aug/07 04:32 PM   Updated: 29/Dec/07 05:37 AM
Component/s: Engine
Affects Version/s: 1.0.3, 1.5.2, 1.5.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1
Fix Version/s: 2.1 Beta 2

Time Tracking:
Not Specified

Issue Links:
Relate


 Description  « Hide
As we know, for specifying table reservation the valid order is

isc_tpb_lock_write | isc_tpb_lock_read
<TABLE NAME>
isc_tpb_shared | isc_tpb_protected | isc_tpb_exclusive

In following TPB declaration

static char isc_tpb[] = {isc_tpb_version3,
isc_tpb_write,
isc_tpb_concurrency,
isc_tpb_nowait,
isc_tpb_protected, isc_tpb_lock_read, "EMPLOYEE"};

isc_tpb_protected will be ignored and default isc_tpb_shared will be used.

The reason is in tra.cpp:

case isc_tpb_shared:
case isc_tpb_protected:
case isc_tpb_exclusive:
 break;

To correct this bug, the code should be replaced by

case gds__tpb_shared:
case gds__tpb_protected:
case gds__tpb_exclusive:
ERR_post(isc_bad_tpb_form, 0);
break;

Why is it important?
The above-mentioned erroneous TPB declaration originates in APIGuide.pdf for IB6
So, APIGuide misleads developers and FB doesn't clarify a matter

Source: Russian-speaking conference http://www.sql.ru/forum/actualthread.aspx?bid=2&tid=388371

With best regards, Eugene

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.