Q about replication timing
I'm looking into options to improve performance of mysql in our app and have a question about replication. I need the following guarantee, which I believe is not possible with replication ... If a client successfully updates the master, any subsequent read from a slave must reflect that update. Or to put it negatively, it must be impossible for a client to update the master and subsequently read an old (pre-update) value from the slave. Am I correct in assuming that replication can not make this guarantee? -- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL join help
Dear list, I've done basic SQL for a number of years, but I recently came up against a query I can't quite seem to figure out the join syntax for. Suppose I have rows in an Object table which are linked in a hierarchy by the entries in a Link table and I want to find all Objects which have given set of Objects as children. For example, given the following data ... CREATE TABLE Object ( id int(11) NOT NULL auto_increment, PRIMARY KEY (id) ); INSERT INTO Object (id) VALUES (1); INSERT INTO Object (id) VALUES (2); INSERT INTO Object (id) VALUES (3); INSERT INTO Object (id) VALUES (4); INSERT INTO Object (id) VALUES (5); INSERT INTO Object (id) VALUES (6); CREATE TABLE Link ( parent int(11) NOT NULL, child int(11) NOT NULL, ); INSERT INTO Link (parent, child) VALUES (1, 4); INSERT INTO Link (parent, child) VALUES (1, 5); INSERT INTO Link (parent, child) VALUES (2, 4); INSERT INTO Link (parent, child) VALUES (2, 5); INSERT INTO Link (parent, child) VALUES (2, 6); INSERT INTO Link (parent, child) VALUES (3, 4); ... I want to find all Objects that have exactly 2 children with ids 4 and 5 (i.e. should match 1, but not 2 or 3) ... what's the query syntax? How about if I want to find all Objects which have no children (i.e. should match 4, 5 and 6, but not 1, 2 or 3). TIA, -- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SQL join help
I figured it out ... At 3:22 PM +0100 5/20/02, ds wrote: On Mon, 2002-05-20 at 13:34, Ray Zimmerman wrote: ... For example, given the following data ... CREATE TABLE Object ( id int(11) NOT NULL auto_increment, PRIMARY KEY (id) ); INSERT INTO Object (id) VALUES (1); INSERT INTO Object (id) VALUES (2); INSERT INTO Object (id) VALUES (3); INSERT INTO Object (id) VALUES (4); INSERT INTO Object (id) VALUES (5); INSERT INTO Object (id) VALUES (6); CREATE TABLE Link ( parent int(11) NOT NULL, child int(11) NOT NULL, ); INSERT INTO Link (parent, child) VALUES (1, 4); INSERT INTO Link (parent, child) VALUES (1, 5); INSERT INTO Link (parent, child) VALUES (2, 4); INSERT INTO Link (parent, child) VALUES (2, 5); INSERT INTO Link (parent, child) VALUES (2, 6); INSERT INTO Link (parent, child) VALUES (3, 4); ... I want to find all Objects that have exactly 2 children with ids 4 and 5 (i.e. should match 1, but not 2 or 3) ... what's the query syntax? SELECT parent FROM Link WHERE child=4 OR child=5 GROUP BY child HAVING count(*)=2; Actually, while this may work for the specific example, it doesn't work in general ... here's the query I finally found to work ... SELECT * FROM Object LEFT OUTER JOIN Link L0 ON (Object.id = L0.parent AND L0.child NOT IN (4,5)), Link L1, Link L2 WHERE L1.parent = Object.id AND L1.child = 4 AND L2.parent = Object.id AND L2.child = 5 AND L0.id IS NULL; How about if I want to find all Objects which have no children (i.e. should match 4, 5 and 6, but not 1, 2 or 3). SELECT id FROM Object LEFT JOIN Link ON (Object.id=Link.parent) WHERE Link.parent IS NULL; And yes, this is basically what I came up with here too. Thanks. -- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Making SQL request from a Mac
I'd like to get informations from my MySQL Server on LiNUX, and the query must be made from a Mac (Not an Os X)! Is there a good solution ? Check out MacSQL Monitor ... http://www.runtimelabs.com/ The other options would be a browser-based query tool and I think there may also be some pure java clients as well, but I like MacSQL Monitor. If it's not possible, How can I get access to a PC With windows ? H ... delete Windows, install Linux or BSD or something :-) There are lots of Windows clients ... probably the mysql web site would be a good place to start. -- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySql for Mac OS X
At 2:36 PM +0200 5/16/01, Robert Goeres wrote: I am looking for MySQL for Apple's Mac OS X (10.0.3). Up to now I have only found some old versions for Mac OS X Server or OS X Beta Any tips or hints? Try this ... http://www.versiontracker.com/moreinfo.fcgi?id=10425 -- %~%~% | Ray Zimmerman ([EMAIL PROTECTED]) | The number you have| | 428-B Phillips Hall| dialed is imaginary. | | Cornell Univ., Ithaca, NY 14853 | Please rotate the phone| | 607-255-9645 Fax: 815-377-3932| 90 degrees and try again.| %~%~% - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQL driver for the macintosh 9.x
At 1:21 PM +1300 3/28/01, andrew.b wrote: Does anyone know where I can find such a beast? Have a look at ... http://www.lilback.com/macsql/ ... and ... http://www.rtlabs.com/ -- %~%~% | Ray Zimmerman ([EMAIL PROTECTED]) | "The number you have| | 428-B Phillips Hall| dialed is imaginary. | | Cornell Univ., Ithaca, NY 14853 | Please rotate the phone| | 607-255-9645 Fax: 815-377-3932| 90 degrees and try again."| %~%~% - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Webmin
Has anyone found a GUI for MySQL on a Linux box? I found Webmin, but it seems limited. Is there an HTML GUI for MySQL? Check out MysqlTool at ... http://dajoba.com/projects/mysqltool/ ... it's a web-based interface implemented in Perl. If you prefer one written in PHP, have a look at phpMyAdmin at ... http://phpwizard.net/projects/phpMyAdmin/ - Ray - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: phpMyAdmin
At 11:08 AM -0500 2/14/01, [EMAIL PROTECTED] wrote: I was reading through the list and found numerous mentions of phpMyAdmin. Since I am a newbie (hoping not to be) at mysql and php, but soon will be using both, I started looking for it on my Linux box. I have both php3 and 4 on the system and mysql seems to be working fine. However, I could not find phpMyAdmin. So how do I get it and how do I put in on this box?? Have a look at ... http://www.htmlwizard.net/projects/phpMyAdmin/ ... or if you prefer a similar tool written in Perl as opposed to PHP, you might want to check out ... http://dajoba.com/projects/mysqltool/ - Ray - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php