﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-kang5528-文章分类-database</title><link>http://www.blogjava.net/kangbaole/category/49834.html</link><description /><language>zh-cn</language><lastBuildDate>Sat, 15 Oct 2011 20:24:18 GMT</lastBuildDate><pubDate>Sat, 15 Oct 2011 20:24:18 GMT</pubDate><ttl>60</ttl><item><title>事务隔离级别</title><link>http://www.blogjava.net/kangbaole/articles/361148.html</link><dc:creator>小康</dc:creator><author>小康</author><pubDate>Thu, 13 Oct 2011 06:51:00 GMT</pubDate><guid>http://www.blogjava.net/kangbaole/articles/361148.html</guid><description><![CDATA[关系数据库标准中有四个事务隔离级别： 
<ul><li>未提交读(Read Uncommitted)：允许脏读，也就是可能读取到其他会话中未提交事务修改的数据</li><li>提交读(Read Committed)：只能读取到已经提交的数据。Oracle等多数数据库默认都是该级别</li><li>可重复读(Repeated Read)：可重复读。在同一个事务内的查询都是事务开始时刻一致的，<strong>InnoDB默认级别</strong>。在SQL标准中，该隔离级别消除了不可重复读，但是还存在幻象读</li><li>串行读(Serializable)：完全串行化的读，每次读都需要获得表级共享锁，读写相互都会阻塞 </li></ul>
<p><br />MySQL中的事务隔离级别（默认为REPEATED-READ）<br />查看：<br />select @@tx_isolation;<br />select @@global.tx_isolation;<br /><br />修改：<br />set global transaction isolation level read committed;<br />set session transaction isolation level read committed;<br /><br /><br /><a href="http://blog.csdn.net/iyfd1979/article/details/6400118">http://blog.csdn.net/iyfd1979/article/details/6400118</a><br />MySQL InnoDB之事务与锁详解 <a href="http://www.mysqlops.com/2011/02/16/mysql-innodb-lock.html">http://www.mysqlops.com/2011/02/16/mysql-innodb-lock.html</a><br /></p><img src ="http://www.blogjava.net/kangbaole/aggbug/361148.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kangbaole/" target="_blank">小康</a> 2011-10-13 14:51 <a href="http://www.blogjava.net/kangbaole/articles/361148.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>