Use latin1 character set when creating the nova database

Nova expects the latin1 character set to be used in its database by
default and then alters the database to utf8 when upgrading the
database (in 082_essex.py).

Nova works this way to work around bug 829209 ("Specified key was too
long" errors) that will be hit with the dns_domains table.

Change-Id: I81e6ed476e8a310fe01809e9afcc2c8d5360e9df
diff --git a/stack.sh b/stack.sh
index a035f55..27b0eb5 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1899,7 +1899,10 @@
 if is_service_enabled mysql && is_service_enabled nova; then
     # (re)create nova database
     mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'DROP DATABASE IF EXISTS nova;'
-    mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE nova;'
+    # Explicitly use latin1: to avoid lp#829209, nova expects the database to
+    # use latin1 by default, and then upgrades the database to utf8 (see the
+    # 082_essex.py in nova)
+    mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE nova CHARACTER SET latin1;'
 
     # (re)create nova database
     $NOVA_DIR/bin/nova-manage db sync