Skip to content

Commit

Permalink
Do not create mysql.password_history in MyRocks if MyRocks is the DDSE (
Browse files Browse the repository at this point in the history
#1381)

Summary:
This table is a system table, not a DD table. Eventually we'll create it in MyRocks, but for now the mix-up between system and DD tables is confusing, and the source code counterpart allowing the creation of password_history in MyRocks was already reverted in #1333

Pull Request resolved: #1381

Differential Revision: D50843849

fbshipit-source-id: 33d6da120d4e9da58ae6bdae64f3b1f2e918c6c7
  • Loading branch information
laurynas-biveinis authored and facebook-github-bot committed Oct 31, 2023
1 parent 79e5144 commit dd13d3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mysql_system_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ SET @cmd = "CREATE TABLE IF NOT EXISTS password_history
User CHAR(80) BINARY DEFAULT '' NOT NULL,
Password_timestamp TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
Password TEXT,";
SET @str = IF(@ddse = 'ROCKSDB', CONCAT(@cmd, "PRIMARY KEY(Host, User, Password_timestamp))", " engine=ROCKSDB CHARACTER SET utf8 COLLATE utf8_bin comment='Password history for user accounts'"), CONCAT(@cmd, "PRIMARY KEY(Host, User, Password_timestamp DESC))", " engine=InnoDB STATS_PERSISTENT=0 CHARACTER SET utf8 COLLATE utf8_bin comment='Password history for user accounts' ROW_FORMAT=DYNAMIC TABLESPACE=mysql", " ENCRYPTION='", @is_mysql_encrypted, "'"));
SET @str = CONCAT(@cmd, "PRIMARY KEY(Host, User, Password_timestamp DESC))", " engine=InnoDB STATS_PERSISTENT=0 CHARACTER SET utf8 COLLATE utf8_bin comment='Password history for user accounts' ROW_FORMAT=DYNAMIC TABLESPACE=mysql", " ENCRYPTION='", @is_mysql_encrypted, "'");
PREPARE stmt FROM @str;
EXECUTE stmt;
DROP PREPARE stmt;
Expand Down

0 comments on commit dd13d3d

Please sign in to comment.