Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schemadiff: validating case-sensitive view names #13208

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions go/vt/schemadiff/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,22 @@ func TestDiffSchemas(t *testing.T) {
"CREATE TABLE `t4` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)",
},
},
{
// Making sure schemadiff distinguishes between VIEWs with different casing
name: "case insensitive views",
from: "create view v1 as select * from t; create table t(id int primary key); create view V1 as select * from t",
to: "",
diffs: []string{
"drop view v1",
"drop view V1",
"drop table t",
},
cdiffs: []string{
"DROP VIEW `v1`",
"DROP VIEW `V1`",
"DROP TABLE `t`",
},
},
}
for _, ts := range tt {
t.Run(ts.name, func(t *testing.T) {
Expand Down