List:General Discussion« Previous MessageNext Message »
From:陈秋丰 Date:February 10 2012 3:31am
Subject:About mysql++3.1.0 SET TRANSACTION ISOLATION LEVEL
View as plain text  
         Hello:
                   I foud a question about function of transaction.
                   In this function switch not have break

Transaction::Transaction(Connection& conn, IsolationLevel level,
                   IsolationScope scope, bool consistent) :
conn_(conn),
finished_(true)                   // don't bother rolling it back if ctor fails
{
         // Set the transaction isolation level and scope as the user wishes
         Query q(conn_.query("SET "));
         if (scope == session) q << "SESSION ";
         if (scope == global)  q << "GLOBAL ";
         q << "TRANSACTION ISOLATION LEVEL ";
         switch (level) {
                   case read_uncommitted:         q << "READ UNCOMMITTED";
                   case read_committed:    q << "READ COMMITTED";
                   case repeatable_read:    q << "REPEATABLE READ";
                   case serializable:              q << "SERIALIZABLE";
         }
Qiufeng Chen

陈秋丰
360平台研发部
[说明: 说明: 说明: 说明: 2-1-26 邮件格]

电话:13693389017
飞信:13693389017
邮件场C座202 100025

Attachment: [text/html]
Attachment: [text/html]
Thread
About mysql++3.1.0 SET TRANSACTION ISOLATION LEVEL 陈秋丰10 Feb