Using odbc, are separate sql_query/2 invocations involving Select guaranteed ACID when followed by a commit

大城市里の小女人 提交于 2019-12-13 05:57:20

问题


I know that the ODBC library has a commit/2 and commit/3, but I'm not sure if I am interpreting its use correctly.

If I do the following

  1. create a session with the {auto_commit, off} attribute
  2. and then do a series of separate sql_query/2 SELECT statements (not batched statements, but separate invocations of sql_query/2)
  3. followed by a commit/2

Are the selects all done within a single transaction guaranteeing ACID properties?


回答1:


It seems that unixodbc-oracle driver is buggy, i.e. it doesn't set auto_commit attribute properly during creation of connection. You can apply https://github.com/brb/otp/commit/111f3c091d5f1e9214d2e7cfbd73400b6602a0ed change, which let you to change auto_commit mode after connection is established.



来源:https://stackoverflow.com/questions/11833254/using-odbc-are-separate-sql-query-2-invocations-involving-select-guaranteed-aci

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!