NDB connection pooling in MySQL and Single User Mode

Since MySQL Cluster 6.2 it is possible to setup a pool inside the mysqld process opening multiple connections to a MySQL Cluster. This is pretty cool, but it might give troubles when you have to use Single User Mode.
Take for example the following configuration for your SQL Nodes:

[SQL]
Id=10
Hostname= 10.100.9.6
[SQL]
Id=11
Hostname= 10.100.9.6
[SQL]
Id=12
Hostname= 10.100.9.7
[SQL]
Id=13
Hostname= 10.100.9.7

No further slots are defined, and you setup your two MySQL Servers to use connection pooling:

[mysqld]
ndb-cluster-connection-pool = 2

This will result in the following output of SHOW in the ndb_mgm client tool:

[mysqld(API)]   4 node(s)
id=10   @10.100.9.6  (mysql-5.1.30 ndb-6.3.20)
id=11   @10.100.9.6  (mysql-5.1.30 ndb-6.3.20)
id=12   @10.100.9.7  (mysql-5.1.30 ndb-6.3.20)
id=13   @10.100.9.7  (mysql-5.1.30 ndb-6.3.20)

Two problems:

  • You don’t have a free slot for restoring backups using ndb_restore, or for using other ndb command line tools.
  • If you go single user mode, e.g. doing ALTER TABLE, you can’t choose 10 or 11 because those will be used by other MySQL connections.

Solution: leave a free [API] slot available to do administrative tasks. Best is to asign it a dedicated NodeID and Hostname so nobody else can use it but the DBA. It’s quite simple, and each MySQL Cluster setup should have this already, even before connection pooling was available.
Connection pooling makes it just harder because when you say ‘ENTER SINGLE USER MODE 12′, you connect to the host ’10.100.9.6′, you are not sure you’ll get this Node ID at all! Eventually you will, but mind that other MySQL connections can use it too.

Pain in the back

Every time I pass by a hotel in the city, an over sized guy is patiently waiting, sitting on an uncomfortable chair, for guests. It is a weird looking lobby really. Just a few chairs and some kind of counter with a laptop on it.
I’m only passing by for two seconds trying to absorb more information of the room. He’s always looking back, spying on the pedestrians, hoping one would enter. It makes me think of a spider that forgot to spin a web.
He’s the manager I guess, or just the night watchman. I find it courageous or just plain stupid to sit on such a chair!

Almost a month daily pictures!

We’re reaching the end of January 2009, and I’ve been busy making at least 1 picture a day. Sometimes very silly pictures like the dolphin statue. There are however a few good ones.

During the past weeks, the main problem I faced was the lack of (natural) light. I tried to take pictures at night, with only the moon and streetlights helping me. I learned quite a bit.

Here is an example of the river Main in Aschaffenburg (Germany). It got a thick layer of ice. The building, Pompejanum, is a replica build around 1850 of a house in Pompeii.

Frozen Main

More pictures to come! Eventually I will make some kind of wall poster for every month with pictures making a mosaic.

All pictures can be viewed on Flickr
.

Car still works!

After 10 minutes looking for my keys, I finally found the will to check on my car. For about a month it stood still somewhere in the street of Aschaffenburg. I feared that the rather extreme cold would have terminated the battery and broken the handbrake. But I started just as normal! Pretty neat. Now it can stand still another month until the weather gets good and the roof can go off.

Tomorrow I’ll go again to the office, but I’ll do it by train. Socializing is good.

CDH sent me its best wishes.. in French.. in Germany!

I got a, I must admit, nice letter from CDH, a political party in Belgium, wishing me well, and giving a list of propositions for Belgians living abroad. There are two problems with the letter however: 1) I’m definitely not Christian-Democrat; 2) my first language is Dutch.

OK, nitpicking on the language, I don’t really care what language it is (I’m Belgian after all). However, why they send such letters not in English or bilingual then? That would make much more sense.

Also, where did they get my address from.. mmm.. I don’t care much about my privacy further than my body, but still..