 |
| 2008-03-19 08:53 |
| Sharing datadir |
| Public |
|
Indeed, this is usually a big no-no. But I have a customer where this is used, validly. Except it wasn't quite right.
Information from branches is replicated back to HQ, and since a slave can't have multiple masters, they have one slave instance for each branch. Each branch uses its own database names and the mysql system db is not replicated, so no conflict resolution is necessary (which would be the other problem with multiple masters).
Log in to any instance, and you will see all databases. And yes you can access them. But in this case they didn't always deliver the correct results.... lots of missing rows, generally. Cause? The instance configs didn't contain the --external-locking option. Added that in, and now it's working fine.
Note that this is unique to MyISAM, don't ever ever try this with InnoDB or any other engine!!
Basically, the external locking option makes MySQL server use filesystem locks so that other instances will know about them, and also doesn't presume that its internal caches are still valid later. So it's not fast, but in this case that wasn't an issue. It's old code, and I wasn't sure the query cache would be aware of this stuff also, so I made sure it was disabled. Just in case.
Sometimes it's useful to know about "old stuff" ;-)
3 Comments | Post A Comment | Add to Memories | Tell a Friend | Link
 |
| 2008-03-19 10:25 |
| Public toilets in Australia - and there's a website |
| Public |
|
Not just a website... a government maintained website! http://www.toiletmap.gov.au/
I encountered this while browsing for camping sites around South-East Queensland.
It's done by a project as part of the "National Continence Management Strategy" of the Australian federal govt department of Health and Aging. There ya go... ;-)
I always tell people that Australian govt is quite good with providing online information, forms, and online services... but this probably takes the cake so far. Mind you, it's an excellent and useful service.
In places like the Netherlands and Germany, you often have to pay for use of these public facilities.
(note for American readers: a toilet is a toilet. Everyone uses them [one hopes]. It is not an offensive word that requires euphemising (yes I made up that word). It's not a bathroom, which as the name suggests has something to do with bathing (washing), and often does not facilitate a toilet at all. Thank you.)
1 Comment | Post A Comment | Add to Memories | Tell a Friend | Link
 |
| 2008-03-19 21:35 |
| Easter Challenge: design db for cooking/cocktail recipes |
| Public |
|
Not sure about prizes yet. I have Open Query pencils (recycled newspaper) and they're transactional with rollback (the eraser ;-) but perhaps I'll come up with something else for this. Anyway, your challenge, should you choose to accept it, is:
Design a MySQL schema, and show me some sample queries (to prove your design works), for doing the following. Given a database of recipes that each contain a number of ingredients, I want to crossmatch this against what I have in my pantry/fridge/cocktailcabinet and find out which recipes I can actually make!
Depending on how you do it this may not seem too complicated; then go to the next step with possible substitute ingredients. This happens both with cooking as well as with cocktails. Devise some kind of equivalence magic (like a soundex for ingredients ;-)
Enjoy! Have some nice chocolate eggs too.
I'm going camping with my daughter Phoebe, who is nearly 3 years old now.
1 Comment | Post A Comment | Add to Memories | Tell a Friend | Link