Tracing down a problem, finding sloppy code

Daniel was tracking down what appeared to be a networking problem…. server reported 113 (No route to host) However, an strace did not reveal the networking stack ever returning that. On the other side, IP packets were actually received. When confronted with mysteries like this, I get suspicious – mainly of (fellow) programmers. I suggested a grep […]

Password rules

The below comes from an Australian government site (formatting is mine, for readability): “Your password must be a minimum length of nine characters, consisting of three of the following – lowercase (a-z) and uppercase (A-Z) alphabetic characters, numeric characters (0-9) or special characters (! $ # %). It cannot contain any 2 consecutive characters that appear […]

innodb_flush_logs_on_trx_commit and Galera Cluster

We deploy Galera Cluster (in MariaDB) for some clients, and innodb_flush_logs_on_trx_commit is one of the settings we’ve been playing with. The options according to the manual: =0 don’t write or flush at commit, write and flush once per second =1 write and flush at trx commit =2 write log, but only flush once per second The flush […]

Mixing databases usually not optimal

Dan McKinley (Etsy) wrote an [IMHO] insightful article Why MongoDB Never Worked at Etsy. First off, it’s important to realise that it’s not a snipe at MongoDB – it’s a fine tool. The lessons are related to mixing multiple databases in a deployment (administration and monitoring overhead) and the acknowledgement that issues of schema design, […]

Luxbet, MariaDB and Melbourne Cup

Yesterday was Melbourne Cup day in Australia – the biggest annual horse race event in the country, and in the state of Victoria it’s even a public holiday. Open Query does work for Luxbet (part of Tabcorp), and Melbourne Cup day is by far their biggest day of the year in terms of traffic. It’s […]

Hint of the day: noatime and relatime in fstab

It’s been written about everywhere, but since we keep spotting installations in the wild where people don’t know about it, it probably deserves another mention. By default, Linux uses the atime option on a disk mount, which means it writes a timestamp (e.g. a write to the drive) every time it reads anything. So in […]

Temporary Tables and Replication

I recently wrote about non-deterministic queries in the replication stream. That’s resolved by using either MIXED or ROW based replication rather than STATEMENT based. Another thing that’s not fully handled by STATEMENT based replication is temporary tables. Imagine the following: Master: CREATE TEMPORARY TABLE rpltmpbreak (i INT); Wait for slave to replicate this statement, then […]

Non-Deterministic Query in Replication Stream

You might find a warning like the below in your error log: 130522 17:54:18 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what […]

LEVENSHTEIN MySQL stored function

At Open Query we steer clear of code development for clients. We sometimes advise on code, but as a company we don’t want to be in the programmer role. Naturally we do write scripts and other necessities to do our job. Assisting with an Open Source project, I encountered three old UDFs. User Defined Functions […]

Fedora 19 – MariaDB Test Day 2013-04-30

From https://fedoraproject.org/wiki/Test_Day:2013-04-30_MariaDB, this installment of Fedora’s Test Day focuses on the replacement of MySQL with MariaDB. If you’re a Fedora (or RHEL or CentOS user), do take a peek at the page and see if you can pitch in – it might be a little bit of work for you, but with great benefits in terms […]