Skip to content

Commit

Permalink
Check MySQL version when printing rocksdb_bulk_load session variables…
Browse files Browse the repository at this point in the history
… in mysqldump

Summary:
As we prepare to migrate to MySQL 8.0, update the check for RockDB support to ensure that dumps from 5.6 can be loaded into 8.0.

Adding this patch to 8.0 will also make sure that dumps from 8.0 will
enable rocksdb_bulk_load in MyRocks.

update-submodule: rocksdb

Reviewed By: lth

Differential Revision: D9136323

fbshipit-source-id: 3a1cdd0
  • Loading branch information
Aliaksei Sandryhaila authored and facebook-github-bot committed Dec 23, 2019
1 parent 1bf5187 commit cc8bb44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mysql-test/suite/rocksdb/r/mysqldump.result
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ update r1 set value1=value1+100 where id1=1 and id2=1 and id3='1';
/*!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 */;
/*!50601 SELECT count(*) INTO @is_rocksdb_supported FROM information_schema.SESSION_VARIABLES WHERE variable_name='rocksdb_bulk_load' */;
/*!50601 SELECT count(*) INTO @is_mysql8 FROM information_schema.TABLES WHERE table_schema='performance_schema' AND table_name='session_variables' */;
/*!50601 SET @check_rocksdb = CONCAT( 'SELECT count(*) INTO @is_rocksdb_supported FROM ', IF (@is_mysql8, 'performance', 'information'), '_schema.session_variables WHERE variable_name=\'rocksdb_bulk_load\'') */;
/*!50601 PREPARE s FROM @check_rocksdb */;
/*!50601 EXECUTE s */;
/*!50601 SET @enable_bulk_load = IF (@is_rocksdb_supported, 'SET SESSION rocksdb_bulk_load=1', 'SET @dummy = 0') */;
/*!50601 PREPARE s FROM @enable_bulk_load */;
/*!50601 EXECUTE s */;
Expand Down

0 comments on commit cc8bb44

Please sign in to comment.