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

Error in parsing transaction settings [ODBC78] #77

Closed
firebird-automations opened this issue Feb 18, 2010 · 3 comments
Closed

Error in parsing transaction settings [ODBC78] #77

firebird-automations opened this issue Feb 18, 2010 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Marco Held (demig-mh)

Assigned to: @samofatov

The function "void IscConnection::parseReservingTable( ... )" did not work like it should. It is used to parse a "set transaction" command and check if some tables are required to be used in a special reservation mode.

According to the sql syntax declaration

SET TRANSACTION
[NAME hostvar]
[READ WRITE | READ ONLY]
[ [ISOLATION LEVEL] { SNAPSHOT [TABLE STABILITY]
| READ COMMITTED [[NO] RECORD_VERSION] } ]
[WAIT | NO WAIT]
[LOCK TIMEOUT seconds]
[NO AUTO UNDO]
[IGNORE LIMBO]
[RESERVING <tables> | USING <dbhandles>]
<tables> ::= <table_spec> [, <table_spec> ...]
<table_spec> ::= tablename [, tablename ...]
[FOR [SHARED | PROTECTED] {READ | WRITE}]
<dbhandles> ::= dbhandle [, dbhandle ...]

it is possible to define several tables in a comma separated list for a special reserving mode. The function does not respect this possibility. Only the comma for separation of different "<table_spec>" clauses is respected.
Furthermore there seems to be a problem in setting the "lockMode" for the table. Within the last "if" section for all tables found during the parsing, the "lockMode" of the last "<table_spec>" clause is set. So the possibility of having different "lockMode" for each "<table_spec>" clause is not respected.

Commits: 39ba753 bc3f5c1

@firebird-automations
Copy link
Author

Commented by: @samofatov

Yes, indeed. I reviewed the relevant portion of the source code, and both bugs your report are indeed there.

IMO, each <table_spec> should have its own isc_tpb_lock_read/isc_tpb_lock_write clumplet in TPB.

I am analyzing your patch for the problem.

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

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

resolution: Fixed [ 1 ]

Fix Version: 2.0 RC2 [ 10320 ]

assignee: Nickolay Samofatov [ skidder ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

1 participant