From 34f12264e884b2ac4c543546d8d581edefbd6d26 Mon Sep 17 00:00:00 2001 From: Sergey Populov Date: Sun, 20 Jun 2021 22:03:59 +0500 Subject: [PATCH] Fix 'Database not selected' error on privileges change --- mysql/resource_grant.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/resource_grant.go b/mysql/resource_grant.go index 39ecb3ef..271c4b08 100644 --- a/mysql/resource_grant.go +++ b/mysql/resource_grant.go @@ -303,7 +303,7 @@ func UpdateGrant(d *schema.ResourceData, meta interface{}) error { return err } - database := d.Get("database").(string) + database := formatDatabaseName(d.Get("database").(string)) table := d.Get("table").(string) if d.HasChange("privileges") {