Hello,

It seems that commit_on_exit option is not overriden in dbisql.exe (version 12.0.1.4165). By default that option is set to "On" (Tools->Options->SQL Anywhere->Commands->Commit on exit or disconnect). When using

SET TEMPORARY OPTION commit_on_exit = 'Off';

I would expect this option to be overriden. But the following example gives unexpected results.
Create simple table and insert single row:

CREATE TABLE IF NOT EXISTS tmp_test_commit_on_exit (t TIMESTAMP);
INSERT INTO tmp_test_commit_on_exit (t) VALUES (CURRENT TIMESTAMP);
COMMIT;

Get inserted value (and remember it):

SELECT * FROM tmp_test_commit_on_exit;

Then run the following statements (without commit):

SET TEMPORARY OPTION commit_on_exit = 'Off';
UPDATE tmp_test_commit_on_exit SET t = CURRENT TIMESTAMP;

After that press F12 (disconnect) or close Interactive SQL. Reconnect/reopen and check the value again:

SELECT * FROM tmp_test_commit_on_exit;

Unfortunately, it gives different timestamp than above.

In SA11 it works as expected (the option is temporarily overriden).

Can anybody confirm that this is a bug, or am I missing something? Thanks. :)

asked 29 Oct '14, 07:55

Arthoor's gravatar image

Arthoor
1.1k264056
accept rate: 0%

edited 29 Oct '14, 07:57


Thank you for this observation Arthoor,

This looks like a small oversight introduced in the rewrites introduced for 12.0.0 and up.

This is being looked into as CR#773279.

As a possible workaround you should be able to use dbisqlc or stay with dbisql.exe from version 11.0.x until this gets resolved. If one could anticipate the disconnect, one could control the transaction directly but that would not always be possible if an unexpected exit occurs, say, due to a user prompt on a error dialog.

permanent link

answered 29 Oct '14, 13:49

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.2k33105
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×74
×31
×14
×1

question asked: 29 Oct '14, 07:55

question was seen: 691 times

last updated: 29 Oct '14, 13:49