Skip to content

Commit

Permalink
Bug#29256562 INCORRECT ERRORS ABOUT PARTITIONS MISSING
Browse files Browse the repository at this point in the history
Partitions should now be correctly handled on all OSs, also
removed system variables check is enabled for 8.0.16 version.

Change-Id: Ic5df668c5562fdce125676f52490e9a446de24ad
  • Loading branch information
konrado0 committed Mar 8, 2019
1 parent 9e6d2d8 commit 9bb0a1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/util/upgrade_check.cc
Expand Up @@ -1067,7 +1067,7 @@ bool UNUSED_VARIABLE(register_removed_sys_vars_check) =
Upgrade_check::register_check(
std::bind(&Sql_upgrade_check::get_removed_sys_vars_check,
std::placeholders::_1, std::placeholders::_2),
"8.0.11", "8.0.13");
"8.0.11", "8.0.13", "8.0.16");
}

std::unique_ptr<Upgrade_check>
Expand Down Expand Up @@ -1138,7 +1138,7 @@ Sql_upgrade_check::get_schema_inconsistency_check() {
"distinct "
replace_in_SQL("substring_index(NAME, '/',1)")
"as schema_name, "
replace_in_SQL("substring_index(substring_index(NAME, '/',-1),'#P#',1)")
replace_in_SQL("substring_index(substring_index(NAME, '/',-1),'#',1)")
" as table_name from "
"information_schema.innodb_sys_tables where NAME like '%/%') A left "
"join information_schema.tables I on A.table_name = I.table_name and "
Expand Down
10 changes: 9 additions & 1 deletion unittest/modules/upgrade_check_t.cc
Expand Up @@ -732,7 +732,15 @@ TEST_F(MySQL_upgrade_check_test, schema_inconsitencies) {

// Make sure special characters like hyphen are handled well
PrepareTestDatabase("schema_inconsitencies_test");
ASSERT_NO_THROW(session->execute("create table `!@#$%&*-_.:?` (i integer);"));
EXPECT_NO_THROW(session->execute("create table `!@#$%&*-_.:?` (i integer);"));

// Make sure partitioned tables do not get positively flagged by accident
EXPECT_NO_THROW(session->execute(
"create table t(a datetime(5) not null) engine=innodb default "
"charset=latin1 row_format=dynamic partition by range columns(a) "
"(partition p0 values less than ('2019-01-23 16:59:53'), partition p1 "
"values less than ('2019-02-22 10:17:03'), partition p2 values less than "
"(maxvalue));"));

std::vector<Upgrade_issue> issues;
ASSERT_NO_THROW(issues = check->run(session, opts));
Expand Down

0 comments on commit 9bb0a1b

Please sign in to comment.