470,874 Members | 1,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

How to avoid a parallel execution in MyQDL.

Hello,

On my server users have access to MySQL database (through PHP). What I
would like to avoid is parallel execution of commands. I mean, if one
user run some sequence of command the sequence of commands run by
another user should stay in query till the first sequence is finished.
Is it possible to reach this only with the usage of "mysql_connect"
in the beginning of sequence of command and "mysql_close" in the
end. In another words, is it true that another user cannot make
connection with DB and execute commands before the first user close
connection (with "mysql_close")?

Oct 19 '05 #1
2 1516
op*********@yahoo.com wrote:
Hello,

On my server users have access to MySQL database (through PHP). What I
would like to avoid is parallel execution of commands. I mean, if one
user run some sequence of command the sequence of commands run by
another user should stay in query till the first sequence is finished.
Is it possible to reach this only with the usage of "mysql_connect"
in the beginning of sequence of command and "mysql_close" in the
end. In another words, is it true that another user cannot make
connection with DB and execute commands before the first user close
connection (with "mysql_close")?

I don't think so. I think you need to read Section 13.4 of the MySQL
manual (MySQL Transactional and Locking Statements).

-david-

Oct 19 '05 #2
> On my server users have access to MySQL database (through PHP). What I
would like to avoid is parallel execution of commands. I mean, if one
user run some sequence of command the sequence of commands run by
another user should stay in query till the first sequence is finished.
Is it possible to reach this only with the usage of "mysql_connect"
in the beginning of sequence of command and "mysql_close" in the
end. In another words, is it true that another user cannot make
connection with DB and execute commands before the first user close
connection (with "mysql_close")?


You might check with the vendor to see if there is some way to
configure it to limit the number of connections. If so, then your
process could grab all the connections, and not relinquish any until
the vital process is complete.

Alternatively, you might check to see if there is a way of expressly
requesting locks on the tables which the vital process uses. If you
start by locking them, that might accomplish the goal without fiddling
with connections.
--
(reverse (concatenate 'string "moc.liamg" "@" "enworbbc"))
http://cbbrowne.com/info/
If we were meant to fly, we wouldn't keep losing our luggage.
Oct 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Franco Fellico' | last post: by
reply views Thread by mmf | last post: by
6 posts views Thread by | last post: by
2 posts views Thread by Neil Ginsberg | last post: by
3 posts views Thread by paytam | last post: by
14 posts views Thread by Dave Booker | last post: by
10 posts views Thread by Mythmon | last post: by
43 posts views Thread by parallelpython | last post: by
5 posts views Thread by fdu.xiaojf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.