While I worked on several web projects I collected a few wishes for MySQL (this collection is more user specific - a MySQL internal wishlist will come later) - which I use in most cases. I still fixed a few things, but don't know if they are good enough for production (because I just started hacking MySQL).
I had an interesting case recently. The customer dealing with large MySQL data warehouse had the table which was had data merged into it with INSERT ON DUPLICATE KEY UPDATE statements. The performance was extremely slow. I turned out it is caused by hundreds of daily partitions created for this table. What is the most interesting (and surprising) not every statement is affected equally as you can see from the benchmarks above:
I got the following test table created:
PLAIN TEXT SQL:
- CREATE TABLE `p10` (
- `id` int(10) UNSIGNED NOT NULL,
- `c` int(10) UNSIGNED NOT NULL,
- PRIMARY KEY (`id`),
- KEY(c)
- ) ENGINE=InnoDB
- PARTITION BY RANGE(id) (
- …
There is the rare bug which I ran into every so often. Last time I've seen it about 3 years ago on MySQL 4.1 and I hoped it is long fixed since... but it looks like it is not. I now get to see MySQL 5.4.2 in the funny state.
When you see bug happening you would see MySQL log flooded with error messages like this:
091119 23:03:34 [ERROR] Error in accept: Resource temporarily
unavailable
091119 23:03:34 [ERROR] Error in accept: Resource temporarily
unavailable
091119 23:03:34 [ERROR] Error in accept: Resource temporarily
unavailable
091119 23:03:34 [ERROR] Error in accept: Resource temporarily
unavailable
filling out disk space
Depending on the case you may be able to connect to MySQL through
Unix Socket or TCP/IP or neither.
It also looks like there is a correlation between having a lot of
tables and such condition.
Previously I was unlucky with seeing this issue in …
[Read more]
Fixes regression - bug 47844.
Configurator and Sandbox
scripts are updated to use this version.
If you build from source then you can upgrade using these
scripts:
Upgrade script from 7.0.7 -> 7.0.8a is here.
Upgrade script from 7.0.8 -> 7.0.8a is here.
Upgrade script from 6.3.26-> 6.3.27a is here.
Follow the instructions in this …
A regression in MySQL Cluster 7.0.8 and 6.3.27 has caused them to
be removed from download.
Problem:
If you have a mysql server with higher node id than 49, then it
will cause cluster to crash.
An updated version of MySQL Cluster 7.0.8, called 7.0.8a will be
released very soon.
The Configurator has been reverted back to use 7.0.7 and 6.3.26.
Sometimes I have seen and heard about that a data node gets stuck
in start phase 101.
Unfortunately it is difficult to reproduce this (found no way
yet), so no bug fix is in the pipe yet.
What happens is that in sp 101, the starting data node (actually
a block called SUMA) should reconnect to the mysql server and
take over the event handling (sending events to the mysql
server), but it never gets the reconnect to the mysql server(s).
A better explanation is here :)
If you see your data node stuck here then try the
following:
1) Restart the mysql servers (one by one), the data node should
now start
or
2) Restart the mysql servers and restart the data node.
Only do 2) if 1) does not work.
And if you know how to reproduce - …
Jonas just wrote a patch to this bug
on OPTIMIZE TABLE, and the issue that was also discussed in this
blog post. Jonas also fixed this bug
when he was at it.
Before, OPTIMIZE TABLE hardly freed up any pages and
to defragment you had to do a rolling restart of the data
nodes.
Now, there is only a 2% discrepancy between OPTIMIZE
TABLE and doing a rolling restart. This is great
stuff.
This will fix will make it into 6.3.26 and 7.0.7.
See below for details:
Creating two tables, t5 and t6:
CREATE TABLE `t5` (
`id` varchar(32) CHARACTER SET utf8 NOT NULL,
`name` varchar(32) …
Currently a number of users has reported upgrade issues on 6.3.x
to 7.0.6 (below is an example what might happen to you).
Thus, we don't recommend you to upgrade from 6.3.x to 7.0.6 in a
production system yet.
However, we are very interested in bug reports and and help with
testing.
We are also of course working on fixing these issues and will
keep you posted when things has improved. Sorry for the
inconvenience.
Currently the "best practice" to upgrade is to:
1) backup / mysqldump
2) start cluster 7.0.6 with initial so it is completely
blank
3) restore backup / load dump
ERROR 1005 (HY000): Can't create table 'test.#sql-3d25_aa905'
(Errno: 140)
mysql> show warnings;
+-------+------+--------------------------------------------------------------------------+
| Level | Code | Message |
…
Over last couple of years I have ran into random MySQL crashes in production when multiple key caches were used. Unfortunately this never was frequent or critical enough issue so I could spend time creating repeatable test case and search of the bug in the MySQL database did not find anything. Recently we had this problem again and now discussed it with Monty's team - this time we found the bug for this issue.
It is no surprise why I could not find the bug easily - the bug is not really related to multiple key caches but to online key cache resize. It is just this code most actively used in case you're using multiple key caches. It is very rare one would resize single key cache in production and it only triggers crash sometimes, while if you're using multiple key caches there are often some scripts in place which adjust their size or change mappings of the tables.
…
[Read more]I ran into a rather interesting situation today with a client. It seems that the mysqld daemon stopped with no errors in the error log. I ran through the obvious problems … not enough disk space, memory utilization etc and came up empty.
The server was running MySQL 4.1 on Fedora Core 5. We can save the discussion about running your database on reasonable up to date hardware and operating system for another post. Core 5 runs the GNU/Linux kernel 2.4 along with the ext3 filesystem and so the thought was in the back of my mind that it might be an issue with file size. Well, as Sun’s own documentation shows this shouldn’t be the case.
During the investigation it was uncovered that the general query log was not only enabled but 16 gigabytes in size. Aside from being so large it was absolutely useless for anything, it was the obvious culprit for …
[Read more]