Skip to content

Commit 2c9bb42

Browse files
committed
MDEV-11432 Change the informational redo log format tag to "MariaDB 10.2.3"
MariaDB 10.2 incorporates MySQL 5.7. MySQL 5.7.9 (the first GA release of the series) introduced an informational field to the InnoDB redo log header, which identifies the server version where the redo log files were created (initialized, resized or updated), in WL#8845: InnoDB: Redo log format version identifier. The informational message would be displayed to the user, for example if someone tries to start up MySQL 8.0 after killing a MariaDB 10.2 server. In the current MariaDB 10.2 source code, the identifier string would misleadingly say "MySQL 5.7.14" (using the hard-coded version number in univ.i) instead of "MariaDB 10.2.3" (using the contents of the VERSION file, the build system copies to config.h and my_config.h). This is only a cosmetic change. The compatibility check is based on a numeric identifier. We should probably also change the numeric identifier and some logic around it. MariaDB 10.2 should refuse to recover from a crashed MySQL 5.7 instance, because the redo log might contain references to shared tablespaces, which are not supported by MariaDB 10.2. Also, when MariaDB 10.2 creates an encrypted redo log, there should be a redo log format version tag that will prevent MySQL 5.7 or 8.0 from starting up.
1 parent dc9f919 commit 2c9bb42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

storage/innobase/include/log0log.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,11 @@ or the MySQL version that created the redo log file. */
555555
/** End of the log file creator field. */
556556
#define LOG_HEADER_CREATOR_END (LOG_HEADER_CREATOR + 32)
557557
/** Contents of the LOG_HEADER_CREATOR field */
558-
#define LOG_HEADER_CREATOR_CURRENT "MySQL " INNODB_VERSION_STR
558+
#define LOG_HEADER_CREATOR_CURRENT \
559+
"MariaDB " \
560+
IB_TO_STR(MYSQL_VERSION_MAJOR) "." \
561+
IB_TO_STR(MYSQL_VERSION_MINOR) "." \
562+
IB_TO_STR(MYSQL_VERSION_PATCH)
559563

560564
/** The redo log format identifier corresponding to the current format version.
561565
Stored in LOG_HEADER_FORMAT. */

0 commit comments

Comments
 (0)