Package: dbconfig-common Version: 2.0.4~bpo8+1 Severity: normal Tags: patch
Dear Maintainer, when using special characters like a "-" in the database name, uninstallation fails because the "DROP DATABASE" statement generated does not use backticks to escape the name. The patch adds backticks to the SQL statement in question. With those in place, uninstallation succeeds as expected. -- System Information: Debian Release: 8.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dbconfig-common depends on: ii debconf [debconf-2.0] 1.5.56 ii ucf 3.0030 dbconfig-common recommends no packages. Versions of packages dbconfig-common suggests: pn dbconfig-mysql | dbconfig-pgsql | dbconfig-sqlite | dbconfig-sqlite <none> -- debconf information excluded
--- /usr/share/dbconfig-common/internal/mysql.orig 2016-09-17 12:18:23.946798604 +0000 +++ /usr/share/dbconfig-common/internal/mysql 2016-09-17 12:19:36.907257043 +0000 @@ -215,7 +215,7 @@ dbc_logpart "dropping database $dbc_dbname:" if _dbc_mysql_check_database "$dbc_dbname"; then - if dbc_mysql_exec_command "DROP DATABASE $dbc_dbname"; then + if dbc_mysql_exec_command "DROP DATABASE \`$dbc_dbname\`"; then dbc_logline "success" dbc_logpart "verifying database $dbc_dbname was dropped:" if _dbc_mysql_check_database "$dbc_dbname"; then