Get the App
SLTechnology News&Howtos  ›  Database  › 

2011-10-26 Autonomous affairs

Shulou Source: shulou.com Published: 2022-06-01 05:16:42 10月04日 Update

Http://www.itpub.net/thread-1499223-9-1.html

85th floor

An autonomous transaction (autonomous transaction) is an independent transaction that is invoked by another transaction (called the main transaction). Which of the following statements about autonomous affairs are true?

(A)

In a program unit that contains autonomous transactions, there can be only one COMMIT or ROLLBACK.

(B)

If the autonomous transaction in the main transaction invocation subroutine changes, then the rollback in the main transaction will still roll back those changes.

(C)

After the autonomous transaction commits changes and returns control to the main transaction, it is possible that although these changes are visible to other sessions, they are not visible to the main transaction.

(D)

If a row of data in the table is locked by the main transaction, the autonomous transaction cannot modify the row.

The answer shows that the 88th floor

2011-10-26 answer CD. (a) the process of autonomous transactions must not leave unfinished transactions. It must be committed or rolled back before it can be returned. As for the number of commits or rollbacks, there is no limit, you can commit / rollback multiple times. (B) obvious error, sub-transaction is independent. (C) correct, if the isolation level of the main transaction is set to SERIALIZABLE, it will not see the modification of the autonomous transaction. (d) correct, this can lead to deadlock.

Tags: Transaction autonomy data answer independent obvious one line unit possibility subroutine control time program level result process error deadlock control restriction Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker Shulou Tech Info Microsoft Xiaomi