UPDATE: Almost solved! See at the end.
A clean installation of a database server is one where everything
goes according to the expectations. It used to be easy: you only
had to do what the manual says, and, presto! you would see your
database server installed and ready to use. If something went
wrong, you got one or more error messages that informed you of
what needs to be fixed.
Sometimes, rarely, it happened that you got also a warning
message, telling you that while the installation was successful,
you could improve it by fine tuning this and that. No big
deal.
Gone are those times. A clean installation nowadays is a much
harder exercise, if not impossible. Let’s give it a try using
MySQL 5.7.7.
Attempt #1 using mysql_install_db
The first error you could do when using a new version of MySQL is
assuming that basic operations are …
MySQL 5.7.8-rc2 was released today, and features a new server utility called mysqlpump. This utility contains a number of major improvements over mysqldump including:
- Parallel processing of databases, and of objects within databases, to speed up the dump process
- For dump file reloading, faster secondary index creation for InnoDB tables by adding indexes after rows are inserted
- Better control over which databases and database objects (tables, views, stored programs, user accounts) to dump
- Dumping of user accounts as account-management statements (CREATE USER, GRANT) rather than as inserts into the mysql system database
- Capability of creating compressed output
- Progress indicator
What I wanted to caution however, is that mysqlpump is not currently consistent. …
[Read more]
I’ve had a look at a preview release of MySQL 5.7.8, some time
before it became available to the general public (perks and
duties of an Oracle ACE) and I found a few interesting
things among the release notes and the tarball itself:
- There is a new tool named mysqlpump, which is intended as a replacement for mysqldump, with parallel processing, compression, progress watch, the long awaited ability of excluding databases or tables, and more.
- The json functionality has been fished out from the labs and added to the main distribution.
Maintaining a project like MySQL::Sandbox is sometimes tiring, but it has its
advantages. One of them is that everything related to the server
setup comes to my attention rather earlier than if I were an
average DBA or developer.
I try to keep MySQL Sandbox up to date with every release of
MySQL and (to a lesser extent) MariaDB [1].
For this reason, I am used to trying a new release with MySQL
Sandbox, and … seeing it fail.
Of the latest changes in MySQL, probably the most disruptive was
what happened in MySQL 5.7.6, where the mysql.user table
lost the password column.
Yep. No ‘password’ column anymore. And just to make the setup
procedure harder, the syntax of SET PASSWORD …
In the MySQL team, we have been working really hard on refactoring the optimizer and improving the cost model. The hacks of storage engines lying to the optimizer are being rolled back, and your chances of getting an optimal query plan should now be much higher than in prior releases of MySQL.
The optimizer team has also allowed cost constants to be configurable on both a server and a storage engine basis, and we are confident that the default InnoDB engine will always work “as good as MyISAM” (which has a natural advantage, in that the optimizer was originally largely built around it.)
Today, I want to issue a challenge:
Find an example where the …
[Read more]I wanted to highlight two new features that are making their way into MySQL 5.7 via the not-yet-released 5.7.8-rc2:
- A new system variable super_read_only allows a more strict definition of ‘read-only’ which also applies to super users.
- A new disabled_storage_engines setting offers a way to prevent an enumerated list of storage engines from being used. For example, a DBA may wish to enforce an InnoDB-only policy to simplify common operations such as backups, but it’s possible MyISAM may sneak back in via new code-deployments. This setting allows more active …
In the MySQL team we are currently considering a proposal to deprecate a number of alternative syntax uses with the INSERT and REPLACE commands. To provide examples:
CREATE TABLE `city` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT '', `CountryCode` char(3) NOT NULL DEFAULT '', `District` char(20) NOT NULL DEFAULT '', `Population` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), KEY `CountryCode` (`CountryCode`), CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `Country` (`Code`) ) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1; INSERT INTO city SET Name='NewCity', CountryCode='CAN',District='MyDistrict',Population=1234; INSERT INTO city (Name,CountryCode,District,Population) VALUE ('NewCity2', 'CAN', 'MyDistrict', 1234); INSERT city (Name,CountryCode,District,Population) VALUES ('NewCity3', 'CAN', 'MyDistrict', 1234); REPLACE INTO city (Name,CountryCode,District,Population) VALUE …[Read more]
In the MySQL team we are currently discussing if we should deprecate the integer display width in numeric types. For example:
CREATE TABLE my_table ( id INT(11) NOT NULL PRIMARY KEY auto_increment );
The (11) does not affect the storage size of the
data type, which for an INT will always be 4 bytes. It affects
the display width.
Our rationale for proposing this should be deprecated is that it
is a common source of confusion amongst users.
We are …
[Read more]In the MySQL team, we have been refactoring the SQL parser to be more maintainable. Gleb Shchepa lists the goals of this project in more details on the MySQL Server Team blog.
As part of this, we have identified the feature PROCEDURE ANALYSE as something that we would like to deprecate. For added context, here is a demonstration:
mysql> SELECT * FROM City procedure analyse()\G *************************** 1. row *************************** Field_name: world.city.ID Min_value: 1 Max_value: 4079 Min_length: 1 Max_length: 4 Empties_or_zeros: 0 Nulls: 0 Avg_value_or_avg_length: 2040.0000 …[Read more]
In the MySQL team, we have been planning for some time to remove the implicit sorting that is provided by GROUP BY. In doing so, we will make a number of existing queries faster (by no longer requiring a sort) as well as unlock opportunities to implement further optimizations.
This is one of the more complicated behaviours to remove, because it is not possible to tell if an application relies upon implicit ordering. Since a GROUP BY query without an ORDER BY clause is a valid query, it is also not reasonable to issue deprecation warnings.
However, one piece of the puzzle that was missing when I last wrote about this problem, is that MySQL 5.7 will …
[Read more]