Re: Mysql update query gives error of lock wait timeout

2009-08-29 Thread Krishna Chandra Prajapati
Increase your Innodb_buffer_pool_size. It will solve your problem.

Thanks,
Krishna

On Sat, Aug 29, 2009 at 10:39 AM, Manasi Save <
manasi.s...@artificialmachines.com> wrote:

> Hi All,
>
> I have a query which gives an error of lock wait timeout only this
> transaction is running with 2 records in the table.
>
> The query is :
>
> Update Test
> Set TestFlag = 1
> Where TestID = 5;
>
> Can this one transaction lock my entire table?
> --
> Thanks and Regards,
> Manasi Save
> Artificial Machines Pvt Ltd.
> manasi.s...@artificialmachines.com
> Ph:- 9833537392
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=prajapat...@gmail.com
>
>


Re: Mysql update query gives error of lock wait timeout

2009-08-28 Thread Manasi Save
Hi,

You are right. The storage engine i m using is InnoDB. but then my concern
is why this simple update query takes so long. Is it true that if its
innodb table then even after specifying where condition it scans all
indexed rows. I am bit confused as mysql.com have mentioned on there site
that even if its a select it locks all the rows and it is reading with
share lock mode.

Can anyone give brief idea about what is exclusive lock and how it works
and what is share lock mode and how it works.

Thanks in advance.

-- 
Regards,
Manasi Save
Artificial Machines Pvt Ltd.

> On Sat, Aug 29, 2009 at 12:09 PM, Manasi Save <
> manasi.s...@artificialmachines.com> wrote:
>
>> Hi All,
>>
>> I have a query which gives an error of lock wait timeout only this
>> transaction is running with 2 records in the table.
>>
>> The query is :
>>
>> Update Test
>> Set TestFlag = 1
>> Where TestID = 5;
>>
>> Can this one transaction lock my entire table?
>>
>>
>>
> Its depend on the storage engine used for the table. For example if the
> table use MyISAM then the transaction will lock entire table, but if you
> use
> InnoDB the transaction will lock only the row which used in transaction.
>
> *cmiiw*
> --
> Muhammad Subair
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Mysql update query gives error of lock wait timeout

2009-08-28 Thread muhammad subair
On Sat, Aug 29, 2009 at 12:09 PM, Manasi Save <
manasi.s...@artificialmachines.com> wrote:

> Hi All,
>
> I have a query which gives an error of lock wait timeout only this
> transaction is running with 2 records in the table.
>
> The query is :
>
> Update Test
> Set TestFlag = 1
> Where TestID = 5;
>
> Can this one transaction lock my entire table?
>
>
>
Its depend on the storage engine used for the table. For example if the
table use MyISAM then the transaction will lock entire table, but if you use
InnoDB the transaction will lock only the row which used in transaction.

*cmiiw*
-- 
Muhammad Subair


Mysql update query gives error of lock wait timeout

2009-08-28 Thread Manasi Save
Hi All,

I have a query which gives an error of lock wait timeout only this
transaction is running with 2 records in the table.

The query is :

Update Test
Set TestFlag = 1
Where TestID = 5;

Can this one transaction lock my entire table?
-- 
Thanks and Regards,
Manasi Save
Artificial Machines Pvt Ltd.
manasi.s...@artificialmachines.com
Ph:- 9833537392




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org