Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect transaction params order in TPB is accepted without returning an error [CORE1416] #1834

Closed
firebird-automations opened this issue Aug 18, 2007 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Kuznetsov Eugene (eugene)

Assigned to: Claudio Valderrama C. (robocop)

Is related to QA181
Relate to CORE1600

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

isc_tpb_lock_write | isc_tpb_lock_read

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

Commits: 786039b

@firebird-automations
Copy link
Collaborator Author

Modified by: Kuznetsov Eugene (eugene)

description: As we know, for specifying table reservation the valid order is

isc_tpb_lock_write | isc_tpb_lock_read

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 is originated 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

=>

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

isc_tpb_lock_write | isc_tpb_lock_read

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Claudio Valderrama C. [ robocop ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1 Beta 2 [ 10190 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue relate to CORE1600 [ CORE1600 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA181 [ QA181 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12830 ] => Firebird [ 13910 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment