MySQL operations in Docker is a three-hour tutorial, and it will be an expansion of the talk by the same title presented at OOW. Attendees who want to play along can do it, by coming prepared with Docker 1.11 or later and the following images already pulled (images with [+] are mandatory, while [-] are optional):
10 Older Entries »
MySQL is a growing presence at Oracle Open World. While most of the headlines belong to the main products, where Oracle services are aiming at world domination, MySQL shared the spotlight, as it was announced to be part of Oracle database cloud. It seems a logical move for Oracle: after all the effort to make MySQL 5.7 the biggest release ever, it stands to reason that it is offered as a competitive feature in its own database as a service.
With this offer, Oracle is applying enterprise pricing and methodologies to a target of emerging companies. MySQL in the Oracle cloud differs from the competition by a few key points:
- It's only MySQL 5.7. While this is the most advanced MySQL server …
Now that MySQL 8.0 has been revealed, it's time to take a deep look at replication features in the latest releases, and review its overall design.
Server UUID vs Server-ID
At the beginning of replication, there was the
server_id variable that identified uniquely a node
in a replication system. The variable is still here, but in MySQL
5.6 it was joined by another value, which is created during the
server initialisation, regardless of its involvement in a
replication system. The
server_uuid is a string of
hexadecimal characters that is the basis for global transaction
select @@server_id, @@server_uuid;
| @@server_id | @@server_uuid |
MySQL-Sandbox 3.1.11 introduces a new utility, different from anything I have put before in the MySQL Sandbox toolkit.
make_sandbox_from_url downloads a tiny MySQL tarball
from a repository and install it straight away.
As of today, the following packages are available
(what you download)
It's usually a good practice to have two columns called
date_created and date_updated in every table. One
can always use it in application and it helps in debugging too as
to when a record was created and last updated in various
circumstances and contexts.
This responsibility can be given to MySQL to automatically assign current time values to these columns.
In MySQL 5.6 onwards, this can be done by setting the data type of the columns to be either date time or timestamp and creating date_created column with NOT NULL DEFAULT CURRENT_TIMESTAMP schema and date_updated column with NOT NULL DEFAULT '0000-00-00 00:00:00' as schema with attribute ON UPDATE CURRENT_TIMESTAMP.
For some reason I do not see numerous public announcements about
recent MySQL 5.7.13 release, even though it happened
a couple of days ago formally. Maybe that's because we do not
have any really "big" new features in this release (new ->> operator for introduced
though for those who, unlike me, care about JSON). Still there
are many fixes for bugs previously reported by Community (or
Oracle engineers, but still in public bugs database), and I'd
like to discuss some of them.
Let me start with the bug that was NOT fixed though, Bug #81093, "mysqld_multi not included in mysql-community-server package", reported by Georgi Iovchev and …
MySQL 5.7.12 was released more than 2 weeks ago. New features
introduced there in a form of "rapid plugins" are widely
discussed, but I am more interested in bugs reported by MySQL
Community users that are fixed there. Unfortunately I do not see
MySQL Community Release Notes by Morgan (like this) for quite a some time, so I have to
continue describing key bug fixes and name people who reported
and verified bugs in my "Fun with Bugs" series.
As usual, let's start with InnoDB bugs fixed:
- Bug #80070 - "allocated_size and file_size differ if create general tablespace outside datadir". It was reported by my former colleague from Percona …
When I got interested in Docker, I started playing idly with the idea of integrating containers and MySQL Sandbox. My first experiments were not encouraging. Using a container the same way I would use a regular server produced horrible results. I started by creating a Debian or CentOS container, installing MySQL Sandbox, and then importing an expanded tarball into the container. What happens is that tarballs of recent MySQL versions expand to roughly 2 GB of binaries. When you try to put that into a container you get a bloated file system. If you want to expand more than one tarball, you get an enormous unusable blob that is contrary to what containers should be used for. There is, of course, the possibility of using volumes, which would avoid the problem of making the container …[Read more]
I've just noted that Oracle had released new versions of MySQL on
February 5, 2016 formally, so while these days I am mostly
thinking about the ways to do support properly, remembering my
colleagues and trying to understand some of RocksDB internals,
it's time to postpone all these and write about bugs again. This
time about some of the public bug reports from MySQL Community
and Oracle engineers that were fixed by Oracle in MySQL 5.7.11.
As usual, I'll try to mention who had reported a bug and who verified it, as I think that names matter in MySQL world. I'll concentrate mostly on InnoDB, replication and optimizer bug reports, trying to highlight regressions clearly.
As usual, I prefer to start with InnoDB bugs:
- Bug #75112 - …
Some results in my initial post in this series led me to
questions that I'll try to answer here. First of all, I noted
that SELECT from a single table ended up with just one
metadata lock request:
(gdb) b MDL_request::init
Breakpoint 1 at 0x648f13: file /usr/src/debug/percona-server-5.6.27-76.0/sql/mdl.cc, line 1266.
Breakpoint 2 at 0x648e70: file /usr/src/debug/percona-server-5.6.27-76.0/sql/mdl.cc, line 1245.
warning: Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
[Switching to Thread 0x7ff224c9f700 (LWP 2017)]
Breakpoint 2, MDL_request::init (this=0x7ff1fbe425a8,
mdl_namespace=MDL_key::TABLE, db_arg=0x7ff1fbe421c8 "test",
10 Older Entries »