3.4.5 SET TRANSACTION Syntax

3.4.5.1 Syntax

SET SESSION TRANSACTION ISOLATION LEVEL level



level: {
     REPEATABLE READ
   | READ COMMITTED
   | READ UNCOMMITTED
   | SERIALIZABLE
}

也支持

SET @@SESSION.TX_ISOLATION = 'level_str' 

level_str:
     REPEATABLE-READ  
   | READ-COMMITTED  
   | READ-UNCOMMITTED  
   | SERIALIZABLE

3.4.5.2 与MySQL语法区别

下文中红色表示不支持的语法或关键字

SET 
-   [GLOBAL | 
    SESSION
-   ] 
    TRANSACTION
    transaction_characteristic 
-    [, transaction_characteristic] ...

transaction_characteristic: {
    ISOLATION LEVEL level
-  | access_mode
}

level: {
     REPEATABLE READ
   | READ COMMITTED
   | READ UNCOMMITTED
   | SERIALIZABLE
}

-access_mode: {
-     READ WRITE
-   | READ ONLY
-}

注:因为隔离级别不加session关键字语义不同,作用域为下一个语句,目前暂不支持不加session

results matching ""

    No results matching ""