Skip to content

Conversation

@ucko
Copy link
Contributor

@ucko ucko commented May 30, 2024

Request forward-only cursors for updates, keyset-driven cursors otherwise. Regardless, specify optimistic cursors, which check timestamps and, when they're not available, values.

Split from #555.

Request forward-only cursors for updates, keyset-driven cursors otherwise.
Regardless, specify optimistic cursors, which check timestamps and, when
they're not available, values.

Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
while (tok != NULL) {
s = savept;

if (strcasecmp(tok, "FOR") == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_next_tok is not terminating the tokens so if you have a query like select * from table for update get_next_token will return for update, not for.

Comment on lines +3972 to +3974
eBaseline,
eFor,
eForUpdate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camel case is a bit out of style in FreeTDS. What e stands for? What about tok_baseline, tok_for, tok_for_update ?

@freddy77
Copy link
Contributor

  • Added a test
  • Fixed issue mentioned above about missing string terminator
  • Add support for comments inside query
  • Rename mnemonics
  • Merged

@freddy77 freddy77 closed this Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants