File: bug-205585-mysql-createdb.sh.patch

package info (click to toggle)
wwwconfig-common 0.3.0
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 488 kB
  • sloc: sh: 952; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- /usr/share/wwwconfig-common/mysql-createdb.sh	2003-08-04 14:47:53.000000000 +0200
+++ mysql-createdb.sh	2003-08-15 16:01:48.000000000 +0200
@@ -39,13 +39,13 @@
     if the password was incorrect.
 	use: dpkg-reconfigure -plow packagename to reconfigure."
 else
-    if $mysqlcmd -f -e "show databases;" | grep -e "^$dbname" > /dev/null 2>&1 ; then
+    if $mysqlcmd -f -B -e "show databases;" | grep -e "^$dbname$" > /dev/null 2>&1 ; then
 	log="${log}Database $dbname already exists."
 	status=nothing
     else
 	log="${log}Creating database $dbname."
 	if $mysqlcmd -f -e "CREATE DATABASE $dbname;" ; then
-	    if ! $mysqlcmd -f -e "show databases;" | grep -e "^$dbname" > /dev/null 2>&1 ; then
+	    if ! $mysqlcmd -f -B -e "show databases;" | grep -e "^$dbname$" > /dev/null 2>&1 ; then
 		error="Database $dbname NOT successfully created. You have to do it manually."
 	    else
 		status=create