storage/appengine: update CloudSQL connection string

Connections are handled slightly differently in the go111 runtime.

Change-Id: I289c3333db2e1b164198bea999c8b085f72618c1
Reviewed-on: https://go-review.googlesource.com/c/perf/+/191478
Reviewed-by: Katie Hockman <katie@golang.org>
diff --git a/storage/appengine/app.go b/storage/appengine/app.go
index 7319fd9..31042eb 100644
--- a/storage/appengine/app.go
+++ b/storage/appengine/app.go
@@ -33,9 +33,15 @@
 		user           = mustGetenv("CLOUDSQL_USER")
 		password       = os.Getenv("CLOUDSQL_PASSWORD") // NOTE: password may be empty
 		dbName         = mustGetenv("CLOUDSQL_DATABASE")
+		socket         = os.Getenv("CLOUDSQL_SOCKET_PREFIX")
 	)
 
-	return db.OpenSQL("mysql", fmt.Sprintf("%s:%s@cloudsql(%s)/%s?interpolateParams=true", user, password, connectionName, dbName))
+	// /cloudsql is used on App Engine.
+	if socket == "" {
+		socket = "/cloudsql"
+	}
+
+	return db.OpenSQL("mysql", fmt.Sprintf("%s:%s@unix(%s/%s)/%s", user, password, socket, connectionName, dbName))
 }
 
 func mustGetenv(k string) string {