How to check whether the lock is a share lock or exclusive lock?
am 03.06.2009 10:15:19 von yueliangdao0608
--0016e647f026912af8046b6d42a8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi.
I want to know which lock method is used within MySQL?
For example, if I query the following statements within MySQL client.
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from GroupId_Test where id = 212 lock in share
mode;
+-----+---------+
| id | GroupId |
+-----+---------+
| 212 | 3014485 |
+-----+---------+
1 row in set (0.00 sec)
But when I execute statement called show engine innodb status, it only
display the total lock numbers.
Anybody can tell me how to see whether the lock is a share lock or exclusive
lock?
--
David Yeung,
MySQL Senior Support Engineer,
Sun Gold Partner.
My Blog:http://yueliangdao0608.cublog.cn
--0016e647f026912af8046b6d42a8--
Re: How to check whether the lock is a share lock or exclusive lock?
am 05.06.2009 11:44:39 von yueliangdao0608
--0016e64607c0c50c35046b96bd50
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Ok. I have already gotten the answer.
On Wed, Jun 3, 2009 at 4:15 PM, Moon's Father wrote:
> Hi.
> I want to know which lock method is used within MySQL?
> For example, if I query the following statements within MySQL client.
> mysql> begin;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> select * from GroupId_Test where id = 212 lock in share
> mode;
>
> +-----+---------+
> | id | GroupId |
> +-----+---------+
> | 212 | 3014485 |
> +-----+---------+
> 1 row in set (0.00 sec)
>
> But when I execute statement called show engine innodb status, it only
> display the total lock numbers.
>
> Anybody can tell me how to see whether the lock is a share lock or
> exclusive lock?
>
>
>
> --
> David Yeung,
> MySQL Senior Support Engineer,
> Sun Gold Partner.
> My Blog:http://yueliangdao0608.cublog.cn
>
>
--
David Yeung,
MySQL Senior Support Engineer,
Sun Gold Partner.
My Blog:http://yueliangdao0608.cublog.cn
--0016e64607c0c50c35046b96bd50--
Re: How to check whether the lock is a share lock or exclusive lock?
am 05.06.2009 13:45:42 von Johan De Meersman
--001485f7786ca5c643046b986e82
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mind sharing ? :-) I don't really have the issue, but it sounds like a
useful trick.
On Fri, Jun 5, 2009 at 11:44 AM, Moon's Father wrote:
> Ok. I have already gotten the answer.
>
> On Wed, Jun 3, 2009 at 4:15 PM, Moon's Father
> >wrote:
>
> > Hi.
> > I want to know which lock method is used within MySQL?
> > For example, if I query the following statements within MySQL client.
> > mysql> begin;
> > Query OK, 0 rows affected (0.00 sec)
> >
> > mysql> select * from GroupId_Test where id = 212 lock in share
> > mode;
> >
> > +-----+---------+
> > | id | GroupId |
> > +-----+---------+
> > | 212 | 3014485 |
> > +-----+---------+
> > 1 row in set (0.00 sec)
> >
> > But when I execute statement called show engine innodb status, it only
> > display the total lock numbers.
> >
> > Anybody can tell me how to see whether the lock is a share lock or
> > exclusive lock?
> >
> >
> >
> > --
> > David Yeung,
> > MySQL Senior Support Engineer,
> > Sun Gold Partner.
> > My Blog:http://yueliangdao0608.cublog.cn
> >
> >
>
>
> --
> David Yeung,
> MySQL Senior Support Engineer,
> Sun Gold Partner.
> My Blog:http://yueliangdao0608.cublog.cn
>
--
Celsius is based on water temperature.
Fahrenheit is based on alcohol temperature.
Ergo, Fahrenheit is better than Celsius. QED.
--001485f7786ca5c643046b986e82--