Re: locking federated table not possible?

2006-03-07 Thread Sebastian Mork
no ideas?
--
Sebastian Mork
[EMAIL PROTECTED]
--

On Mon, 06 Mar 2006 19:46:53 +0100
Sebastian Mork <[EMAIL PROTECTED]> wrote:

> Hi,
> is it not possible to lock federated tables (creating a lock on the remote 
> machine to lock the table on the machine containing the data?)
> 
> I've a situation where I have some different databases on different servers 
> but they share a small amount of tables that are physically stored on only 
> one machine.
> the other (remote) servers use these table as federated tables.
> 
> on the server where the data is stored physically in a myIsam-table I can 
> lock the table, insert some data and unlock it.
> I've made some tests where I create a write lock, then call 1 queries to 
> insert some data (when starting these queries I created a new request that 
> tries to insert data) then the first request unlocks the table and the second 
> request runs when the unlock is done. great.
> but when I try to run a lock on a federated table it has no effect, I try to 
> lock the table, insert 1 rows and unlock the table again. but when I'm 
> running a second request while the 1 rows are inserted the second request 
> doesnt wait for the table to be unlocked, the data is inserted while the 
> first request is made.
> 
> here is my request thats starting first: (some pseudo-style code)
> ---
> lock tables tbl_lager write;
> do from 1 to 1
> INSERT INTO `tbl_lager` (`fld_pid`) VALUES ('1');
> end do
> unlock tables;
> unlocked at #now()#
> 
> and heres the second that starts when the first is running:
> ---
> lock tables tbl_lager write;
> INSERT INTO `tbl_lager` (`fld_pid`) VALUES ('1');
> unlock tables;
> unlocked at #now()#
> 
> 
> doing this local ob the server where the data is stored physically it works 
> fine.
> but on the federated table it doesn't work.
> 
> Any comments would be great. thx.
> -- 
> Sebastian Mork <[EMAIL PROTECTED]>
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
Sebastian Mork <[EMAIL PROTECTED]>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



locking federated table not possible?

2006-03-06 Thread Sebastian Mork
Hi,
is it not possible to lock federated tables (creating a lock on the remote 
machine to lock the table on the machine containing the data?)

I've a situation where I have some different databases on different servers but 
they share a small amount of tables that are physically stored on only one 
machine.
the other (remote) servers use these table as federated tables.

on the server where the data is stored physically in a myIsam-table I can lock 
the table, insert some data and unlock it.
I've made some tests where I create a write lock, then call 1 queries to 
insert some data (when starting these queries I created a new request that 
tries to insert data) then the first request unlocks the table and the second 
request runs when the unlock is done. great.
but when I try to run a lock on a federated table it has no effect, I try to 
lock the table, insert 1 rows and unlock the table again. but when I'm 
running a second request while the 1 rows are inserted the second request 
doesnt wait for the table to be unlocked, the data is inserted while the first 
request is made.

here is my request thats starting first: (some pseudo-style code)
---
lock tables tbl_lager write;
do from 1 to 1
INSERT INTO `tbl_lager` (`fld_pid`) VALUES ('1');
end do
unlock tables;
unlocked at #now()#

and heres the second that starts when the first is running:
---
lock tables tbl_lager write;
INSERT INTO `tbl_lager` (`fld_pid`) VALUES ('1');
unlock tables;
unlocked at #now()#


doing this local ob the server where the data is stored physically it works 
fine.
but on the federated table it doesn't work.

Any comments would be great. thx.
-- 
Sebastian Mork <[EMAIL PROTECTED]>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]