����������������
��������������������
MySQL������������������������������������
����������������������OFF������������������REPEATABLE READ��������������������������SQL������������������������������������������������������������
����������SUPER��������������������������������������������������������
������������������init_connect������������������������������
http://dev.mysql.com/doc/refman/5.1/ja/server-system-variables.html
����������
Date: Tue, 28 Aug 2012 10:13:57 +0900
From: hiro@freegw.net
Subject: [mysql 15829] Re: mysql����������������������������������
To: ml@mysql.gr.jp
����������
��������������������
������������select����������������select��������select�������������������������������������������������� ������������������������������������������������������������������������������������������������������������������������������������������������������java��ruby������������������������������������������������������������������������������
������������������insert������������������������������������������������������������������������������������������������������������������������������������������������mysql����������������������������������10����������������������������������������������
����������������������
2012��8��28�� 1:37 Tomohiro 'Tomo-p' KATO
<tomop@teamgedoh.net>:
��������������������������
On 12/08/28 0:31, ���� wrote:
> ����������������������������2����������������������commit����������������������
> ������������������������������������������������
> ������������������������������������C3��������������������������������������
> ������������������������������������
����������������������������������������������������������select����
��"LOCK IN SHARE MODE"��"FOR UPDATE" ����������������������������������
��commit������������������������������������������������������������
������select������������������������������������������������
��������: VineSeed + MySQL-5.5.25
*����1: ������select��
-----------------------------------------------------------------
mysql> select * from test;
+----+------+
| id | val |
+----+------+
| 1 | 100 |
+----+------+
1 row in set (0.00 sec)
(��) ��������������������
mysql> select * from test;
+----+------+
| id | val |
+----+------+
| 1 | 100 | <--------------------- ��������
+----+------+
1 row in set (0.00 sec)
mysql> select * from test; <------------- ����������������
+----+------+
| id | val |
+----+------+
| 1 | 100 | <--------------------- ��������
+----+------+
1 row in set (0.01 sec)
mysql> commit; <--------------------- commit��������
Query OK, 0 rows affected (0.00 sec)
mysql> select * from test;
+----+------+
| id | val |
+----+------+
| 1 | 200 | <--------------------- ��������
+----+------+
1 row in set (0.00 sec)
-----------------------------------------------------------------
*����2: ����������select��������������
-----------------------------------------------------------------
mysql> select * from test;
+----+------+
| id | val |
+----+------+
| 1 | 200 |
+----+------+
1 row in set (0.00 sec)
(��) ��������������������
mysql> select * from test;
+----+------+
| id | val |
+----+------+
| 1 | 200 | <--------------------- ��������
+----+------+
1 row in set (0.00 sec)
mysql> select * from test for update; <-- ������������select��������
+----+------+
| id | val |
+----+------+
| 1 | 300 | <--------------------- ��������
+----+------+
1 row in set (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
-----------------------------------------------------------------
����������������������������������������������������������������������
��MySQL������������������������������������������
http://www.y2sunlight.com/ground/?MySQL4.1%2F9.MySQL%A4%CE%BC%C2%B8%B3%2F4.%A5%C8%A5%E9%A5%F3%A5%B6%A5%AF%A5%B7%A5%E7%A5%F3
--
__________________________________________________
_/_/ Tomohiro "Tomo-p" KATO <
tomop@teamgedoh.net>
_/_/ Team Gedoh Network
http://www.teamgedoh.net/
_/_/ Key fingerprint = A6D8 3981 3575 9F00 EFC3 9C2B F03A 5383 9287 74D9