Stewart Smith recently questioned the current relevance of the MERGE storage engine, and it prompted me to finish a similar recent exercise I’ve been thinking about related to MySQL clients (UPDATE: and programs). This originally came up when I listed the contents of the MySQL bin directory:
Volume in drive D is Data
Volume Serial Number is 4015-B2FF
Directory of D:\mysql-advanced-5.6.11-win32\bin
04/05/2013 06:52 AM 123,392 echo.exe
04/05/2013 06:53 AM 4,696,064 innochecksum.exe
04/05/2013 06:54 AM 5,084,672 myisamchk.exe
04/05/2013 06:54 AM 4,084,736 myisamlog.exe
04/05/2013 06:54 AM 4,998,144 myisampack.exe
04/05/2013 06:54 AM 4,969,984 myisam_ftdump.exe
04/05/2013 06:56 AM 5,525,504 mysql.exe
04/05/2013 06:56 AM 5,445,120 mysqladmin.exe
04/05/2013 06:57 AM 5,586,944 mysqlbinlog.exe
04/05/2013 06:56 AM 5,443,072 mysqlcheck.exe
04/05/2013 06:52 AM 28,397,056 mysqld-debug.exe
04/05/2013 06:58 AM 11,696,640 mysqld.exe
04/05/2013 06:57 AM 5,507,072 mysqldump.exe
04/05/2013 06:56 AM 5,435,392 mysqlimport.exe
04/05/2013 06:56 AM 5,436,928 mysqlshow.exe
04/05/2013 06:56 AM 5,458,432 mysqlslap.exe
04/05/2013 06:56 AM 5,687,296 mysqltest.exe
04/05/2013 06:57 AM 12,373,504 mysqltest_embedded.exe
04/05/2013 06:56 AM 5,888,512 mysql_client_test.exe
04/05/2013 06:57 AM 12,620,800 mysql_client_test_embedded.exe
04/05/2013 06:56 AM 4,704,256 mysql_config_editor.exe
04/05/2013 06:57 AM 12,241,408 mysql_embedded.exe
04/05/2013 06:56 AM 4,701,696 mysql_plugin.exe
04/05/2013 06:53 AM 3,791,360 mysql_tzinfo_to_sql.exe
04/05/2013 06:56 AM 4,836,864 mysql_upgrade.exe
04/05/2013 06:53 AM 4,687,360 my_print_defaults.exe
04/05/2013 06:54 AM 4,800,000 perror.exe
04/05/2013 06:53 AM 3,804,160 replace.exe
04/05/2013 06:53 AM 4,686,336 resolveip.exe
It was a strange epiphany to realize that we were distributing clients (and programs) of which I had never heard. Maybe you have an encyclopedic knowledge of all MySQL clients (and programs). If so, great – maybe you can answer some of my questions! My quest for more information about the clients (and programs) I wasn’t familiar with naturally led to our excellent documentation, where I found more “client programs” listed that raised my eyebrows. Below I’ll make some observations and suggestions on what ought to be done with these clients (and programs) – feel free to make comments here, or on any associated bug reports:
Seemingly last really updated in 2000 (during 3.21 days), mysqlaccess is (“was” is probably better) a tool for inspecting and auditing privileges. It hardly works (only on Linux, after giving it a path to mysqlbinlog(!) because it doesn’t look in PATH), it has no concept of post-3.21 developments like new privileges, schema objects like VIEWs or STORED ROUTINEs, authentication plugins, expired passwords, proxy users, etc. It seems useless to me, and I’ve opened bug 69012 to deprecate it. It appears to be such old Perl, it doesn’t even use DBI.
More a script than a client, myisam_ftdump is something I’ve never seen used during my 6+ years with the MySQL Support team. In fact, I didn’t even know it existed. People may or may not migrate their fulltext use cases from MyISAM to InnoDB now that MySQL 5.6 includes fulltext search capabilities in InnoDB, but has anybody ever used this client?
Raise your hand if you’ve ever heard of myisamlog, much less seen output from this
client program. I know at least one person whose hand is up right now – Daniel van Eeden recently reported what’s widely believed to be the first ever bug report about this client. If you’ve got a need for this client, make sure to note it on the bug report, because we’re still looking for a reason to keep it.
Another Perl script, but a bit more recent than mysqlaccess (this even uses DBI). The purpose of mysql_convert_table_format is to convert tables matching the selection criteria (it uses SHOW TABLES LIKE) from one storage engine to another. Perhaps a useful script before INFORMATION_SCHEMA made it easy to produce arbitrary SQL commands which could be piped to another mysql client:
SELECT CONCAT(‘ALTER TABLE `’, table_schema, ‘`.`’, table_name, ‘` ENGINE = InnoDB;’) AS `#sql`
WHERE table_schema LIKE ‘test’;
I suggest deprecation in bug 69014.
I get that it’s possible that many ages ago, migrating data files from a file system that was case-insensitive to one that is case-sensitive would cause problems. And theoretically, that could still be an issue, as mysqld on linux still won’t recognize .FRM files and friends if they have lower-case file extensions (what mysql_fix_extensions deals with). But Windows builds have created these files with extensions using the “canonical form” for ages now – what ancient version of MySQL do you need to be running to create lower-case .frm files? I still haven’t figured this out. It also happens to be one of the most simple Perl scripts ever, with a total of 5 lines of code. I propose deprecation in bug 69015.
Quoting the mysql_find_rows Perl script:
This is useful to find things in a MySQL update log.
Quoting the MySQL 5.0 reference manual:
The binary log has replaced the old update log, which is no longer available as of MySQL 5.0.
Yeah, I’m going with it being time to deprecate this script (bug 27482 seems to agree).
An interactive way to manage user permissions for MySQL, mysql_setpermission is another Perl script which hasn’t kept with the times. Some operations use hard-coded privileges that don’t include more recent additions (like EXECUTE); it will cause problems for SHA-256 user accounts; it has no concept of authentication plugins or proxy users. People looking for an interactive interface for managing user permissions should look at MySQL Workbench. I’m recommending deprecation and removal in bug 69016.
I’ve got the book to prove I started using MySQL back in the days when mSQL was still something people knew about. But I wonder when the last time was somebody migrated from mSQL to MySQL? And did they really use this tool? I vote to deprecate (bug 69017).
This one’s not documented, as far as I can tell. There’s also no help, but then again, maybe it is displaying the help, in a juvenile, repeat-everything-I-say way:
I have to wonder why this is distributed with the MySQL server. If it’s needed for plumbing somewhere, OK, but does it really need to be distributed? If so, can we pull it out of the server packages and put it somewhere else? Bug 69018 aims to answer those questions.
There are a couple more clients I’m not a fan of (like replace and resolveip), but know there are specific use cases. I question whether they should be part of the server package or not, but don’t see much harm in keeping them. It’s probably been years since either was last modified (I get an error trying to run replace on Windows XP).
If you have any particular affinity for any of the above client programs/scripts, or suggestions for other deprecation candidates, please comment here or via bugs.mysql.com.