Skip to content

Commit

Permalink
schemadiff: validating case-sensitive view names (vitessio#13208)
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach authored and arvind-murty committed Jun 7, 2023
1 parent 55285a5 commit cb143ef
Showing 1 changed file with 16 additions and 0 deletions.
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

0 comments on commit cb143ef

Please sign in to comment.