I did some detective work: mysql_install_db 5.5 was patched in
Debian/Ubuntu to not create the test database. In 5.6 packaging,
mysql_install_db isn't run during a normal install (the necessary lines
are part of postinst instead), so it was never necessary to patch it to
not create the test database.

If you need a line that works in both 5.5 and 5.6:

mysql --socket=${MYSQL_UNIX_PORT} --execute "CREATE DATABASE
${DO_MYSQL_DBNAME} IF NOT EXISTS;"

The last clause of the SQL string makes sure it doesn't fail if the
database already exists.

Another option is to patch mysql_install_db in 5.6 packaging.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1423026

Title:
  Build fails due to test creation of test database that already exists

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby-mysql2/+bug/1423026/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to