mysqldump: The 'INFORMATION_SCHEMA.SESSION_VARIABLES' feature is disabled
When I try to run mysqldump on a Percona Server 5.7.17-12, I get this error:
# mysqldump -u backups -pxxxx -h 127.0.0.1 --single-transaction --quick dbname
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- MySQL dump 10.13 Distrib 5.7.17-12, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: dbname
-- ------------------------------------------------------
-- Server version 5.7.17-12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!50112 SELECT COUNT(*) INTO @is_rocksdb_supported FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='rocksdb_bulk_load' */;
/*!50112 SET @save_old_rocksdb_bulk_load = IF (@is_rocksdb_supported, 'SET @old_rocksdb_bulk_load = @@rocksdb_bulk_load', 'SET @dummy_old_rocksdb_bulk_load = 0') */;
/*!50112 PREPARE s FROM @save_old_rocksdb_bulk_load */;
/*!50112 EXECUTE s */;
/*!50112 SET @enable_bulk_load = IF (@is_rocksdb_supported, 'SET SESSION rocksdb_bulk_load = 1', 'SET @dummy_rocksdb_bulk_load = 0') */;
/*!50112 PREPARE s FROM @enable_bulk_load */;
/*!50112 EXECUTE s */;
/*!50112 DEALLOCATE PREPARE s */;
mysqldump: Couldn't execute 'SELECT COUNT(*) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'rocksdb\_skip\_fill\_cache'': The 'INFORMATION_SCHEMA.SESSION_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56' (3167)
Why mysqldump is trying to use that deprecated variable? Is there any way to fix it beside enabling show_compatibility_56
(I would prefer not doing it and also not restarting the server)
Solution 1:
This is a bug of Percona Server 5.7:
This was introduced as part of our work in porting Facebook MySQL MyRocks engine to Percona Server 5.7. The use of I_S over P_S was not caught during the merge of this feature from 5.6 to 5.7
An immediate workaround is to change the show_compatibility_56 back to the default value of ON which will expose the needed tables within I_S. See https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_show_compatibility_56 for details.
Alternately, a mysqldump binary from a previous version install can be used in place of the one packaged with the recent release.
I expect to have this fixed with the next release of Percona Server 5.7
https://bugs.launchpad.net/percona-server/+bug/1676401
FIXED: The bug has been fixed with the release of Percona Server 5.7.17-13.