Jamie McClelland: MariaDB mystery
I keep getting an error in our backup logs:
It s a WordPress database having trouble dumping the options table.
The error log has a corresponding message:
The Internet is full of suggestions, almost all of which either focus on the
network connection between the client and the server or the FEDERATED plugin.
We aren t using the federated plugin and this error happens when conneting via
the socket.
Check it out - what is better than a consistently reproducible problem!
It happens if I try to select all the values in the table:
It happens when I specifiy one specific offset:
It happens if I specify the field name explicitly:
It doesn t happen if I specify the key field:
It does happen if I specify the value field:
It doesn t happen if I query the specific row by key field:
Hm. Surely there is some funky non-printing character in that Resetting the value to an empty value doesn t make a difference:
Deleting the row in question causes the error to specify a new offset:
If I put the record I deleted back in, we return to the old offset:
I m losing my little mind. Let s get drastic and create a whole new table, copy over the data delicately working around
the deadly offset:
Now let s make sure all is working properly:
Now let s examine which row we are missing:
Wait, what? I was expecting option_id 16296351.
Oh, now we are getting somewhere. And I see my mistake: when using offsets, you need to use Now that I have the correct row what is in it:
Well, that makes a lot more sense. Let s start over with examining the value:
Wow, that s a lot of characters. If it were a book, it would be 35,000 pages
long (I just discovered this
site). It s a
Sep 11 05:08:03 Warning: mysqldump: Error 2013: Lost connection to server during query when dumping table 1C4Uonkwhe_options at row: 1402
Sep 11 05:08:03 Warning: Failed to dump mysql databases ic_wp
Sep 11 13:50:11 mysql007 mariadbd[580]: 2024-09-11 13:50:11 69577 [Warning] Aborted connection 69577 to db: 'ic_wp' user: 'root' host: 'localhost' (Got an error writing communication packets)
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options' ic_wp > /dev/null
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options limit 1 offset 1402' ic_wp
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select option_id,option_name,option_value,autoload from 1C4Uonkwhe_options limit 1 offset 1402' ic_wp
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select option_id from 1C4Uonkwhe_options limit 1 offset 1402' ic_wp
+-----------+
option_id
+-----------+
16296351
+-----------+
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select option_value from 1C4Uonkwhe_options limit 1 offset 1402' ic_wp
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options where option_id = 16296351' ic_wp
+-----------+----------------------+--------------+----------+
option_id option_name option_value autoload
+-----------+----------------------+--------------+----------+
16296351 z_taxonomy_image8905 yes
+-----------+----------------------+--------------+----------+
root@mysql007:~#
option_value right?
root@mysql007:~# mysql --protocol=socket -e 'select CHAR_LENGTH(option_value) from 1C4Uonkwhe_options where option_id = 16296351' ic_wp
+---------------------------+
CHAR_LENGTH(option_value)
+---------------------------+
0
+---------------------------+
root@mysql007:~# mysql --protocol=socket -e 'select HEX(option_value) from 1C4Uonkwhe_options where option_id = 16296351' ic_wp
+-------------------+
HEX(option_value)
+-------------------+
+-------------------+
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'update 1C4Uonkwhe_options set option_value = "" where option_id = 16296351' ic_wp
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options' ic_wp > /dev/null
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'delete from 1C4Uonkwhe_options where option_id = 16296351' ic_wp
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options' ic_wp > /dev/null
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~# mysqldump ic_wp > /dev/null
mysqldump: Error 2013: Lost connection to server during query when dumping table 1C4Uonkwhe_options at row: 1401
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'insert into 1C4Uonkwhe_options VALUES(16296351,"z_taxonomy_image8905","","yes");' ic_wp
root@mysql007:~# mysqldump ic_wp > /dev/null
mysqldump: Error 2013: Lost connection to server during query when dumping table 1C4Uonkwhe_options at row: 1402
root@mysql007:~#
oot@mysql007:~# mysql --protocol=socket -e 'create table 1C4Uonkwhe_new_options like 1C4Uonkwhe_options;' ic_wp
root@mysql007:~# mysql --protocol=socket -e 'insert into 1C4Uonkwhe_new_options select * from 1C4Uonkwhe_options limit 1402 offset 0;' ic_wp
--- There is only 33 more records, not sure how to specify unlimited limit but 100 does the trick.
root@mysql007:~# mysql --protocol=socket -e 'insert into 1C4Uonkwhe_new_options select * from 1C4Uonkwhe_options limit 100 offset 1403;' ic_wp
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_new_options' ic_wp >/dev/null;
root@mysql007:~# mysql --protocol=socket -e 'select option_id from 1C4Uonkwhe_options where option_id not in (select option_id from 1C4Uonkwhe_new_options) ;' ic_wp
+-----------+
option_id
+-----------+
18405297
+-----------+
root@mysql007:~#
ORDER BY or you won t get consistent results.
root@mysql007:~# mysql --protocol=socket -e 'select option_id from 1C4Uonkwhe_options order by option_id limit 1 offset 1402' ic_wp ;
+-----------+
option_id
+-----------+
18405297
+-----------+
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select * from 1C4Uonkwhe_options where option_id = 18405297' ic_wp ;
ERROR 2013 (HY000) at line 1: Lost connection to server during query
root@mysql007:~#
root@mysql007:~# mysql --protocol=socket -e 'select CHAR_LENGTH(option_value) from 1C4Uonkwhe_options where option_id = 18405297' ic_wp ;
+---------------------------+
CHAR_LENGTH(option_value)
+---------------------------+
50814767
+---------------------------+
root@mysql007:~#
LONGTEXT
field so it should be able to handle it. But now I have a better idea of what
could be going wrong. The name of the option is rewrite_rules so it seems
like something is going wrong with the generation of that option.
I imagine there is some tweak I can make to allow MariaDB to cough up the value
(read_buffer_size? tmp_table_size?). But I ll start with checking in with
the database owner because I don t think 35,000 pages of rewrite rules is
appropriate for any site.
Version 0.0.18 of
I ve been influenced again into feeling the need for a garment.
It was again a case of multiple sources conspiring in the same direction
for unrelated reasons, but I decided I absolutely needed a linen hood,
made from the
My first idea was to make a square hood: some time ago I had already
made one out of some leftovers of duvet cover, vaguely inspired by the
Except, before I even started on the square hood, I started to think
that the same square top would also be good for a hood-scarf, one of
those long flowy garments that sit on the head, wrap around the neck and
fall down, moving with the wind and the movements of the person.
Because, let s be honest. worn in a way that look like a veil they feel
nice, it s true. But with the help of a couple of pins then you can do
this.
And no, I ve never played that game
Like each month, have a look at the work funded by
The 









For their 30th anniversary (ish; the Covid pandemic pushed the date out a bit) British electronic music duo Orbital released the compilation 

And here is the new logo:






Dear Debian community,
this are my bits from DPL for August.
Happy Birthday Debian
On 16th of August Debian celebrated its 31th birthday. Since I'm
unable to write a better text than our great publicity team I'm
simply linking to their article for those who might have missed it: