diff roundup/backends/back_mysql.py @ 6760:38e0fc1c7f11

issue2551216 - create mysql databases using COLLATE utf8_general_ci Otherwise the test suite crashes in three tests under python2. With python3 the crash does not happaen, but python3 passes with this change as well.
author John Rouillard <rouilj@ieee.org>
date Sun, 10 Jul 2022 15:49:39 -0400
parents 39189dd94f2c
children bdd28b244839
line wrap: on
line diff
--- a/roundup/backends/back_mysql.py	Tue Jul 05 19:45:12 2022 -0400
+++ b/roundup/backends/back_mysql.py	Sun Jul 10 15:49:39 2022 -0400
@@ -92,7 +92,7 @@
     kwargs = connection_dict(config)
     conn = MySQLdb.connect(**kwargs)
     cursor = conn.cursor()
-    command = "CREATE DATABASE %s"%config.RDBMS_NAME
+    command = "CREATE DATABASE %s COLLATE utf8_general_ci"%config.RDBMS_NAME
     if sys.version_info[0] > 2:
         command += ' CHARACTER SET utf8'
     logging.info(command)

Roundup Issue Tracker: http://roundup-tracker.org/