summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2018-04-11 16:50:32 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-04-30 19:34:08 +0400
commit9a8498066865b508239b36853403f2700800af2b (patch)
tree265e8c8abb576d57960a8f43ac6e5b4e0b9f9bf2 /debian
parent8bbcc0d5050dcbd44c0bc396c6b1acd488d3dfe2 (diff)
downloadmariadb-git-9a8498066865b508239b36853403f2700800af2b.tar.gz
MDEV-12645 - mysql_install_db: no install test db option
Added --skip-test-db option to mysql_install_db. If specified, no test database created and relevant grants issued. Removed --skip-auth-anonymous-user option of mysql_install_db. Now it is covered by --skip-test-db. Dropped some Debian patches that did the same. Removed unused make_win_bin_dist.1, make_win_bin_dist and mysql_install_db.pl.in.
Diffstat (limited to 'debian')
-rw-r--r--debian/mariadb-server-10.3.install1
-rw-r--r--debian/mariadb-server-10.3.postinst4
-rw-r--r--debian/patches/00list3
-rwxr-xr-xdebian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch38
-rwxr-xr-xdebian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch20
-rwxr-xr-xdebian/patches/50_mysql-test__db_test.dpatch24
6 files changed, 4 insertions, 86 deletions
diff --git a/debian/mariadb-server-10.3.install b/debian/mariadb-server-10.3.install
index d8de5512b05..94e6a0626e8 100644
--- a/debian/mariadb-server-10.3.install
+++ b/debian/mariadb-server-10.3.install
@@ -98,4 +98,5 @@ usr/share/mysql/mysql_performance_tables.sql
usr/share/mysql/mysql_system_tables.sql
usr/share/mysql/mysql_system_tables_data.sql
usr/share/mysql/mysql_test_data_timezone.sql
+usr/share/mysql/mysql_test_db.sql
usr/share/mysql/wsrep_notify
diff --git a/debian/mariadb-server-10.3.postinst b/debian/mariadb-server-10.3.postinst
index 2a85099b45b..c9fd3d31334 100644
--- a/debian/mariadb-server-10.3.postinst
+++ b/debian/mariadb-server-10.3.postinst
@@ -141,7 +141,9 @@ EOF
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set +e
- bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
+ bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql \
+ --disable-log-bin --skip-test-db 2>&1 | \
+ $ERR_LOGGER
set -e
diff --git a/debian/patches/00list b/debian/patches/00list
index 5d090c644f1..547a0c5ef64 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,5 +1,2 @@
-33_scripts__mysql_create_system_tables__no_test.dpatch
38_scripts__mysqld_safe.sh__signals.dpatch
-41_scripts__mysql_install_db.sh__no_test.dpatch
-50_mysql-test__db_test.dpatch
61_replace_dash_with_bash_mbug675185.dpatch
diff --git a/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch b/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
deleted file mode 100755
index 06c984c398c..00000000000
--- a/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: scripts__mysql_create_system_tables__no_test
-## DP: A user with no password prevents a normal user from login under certain
-## DP: circumstances as it is checked first. See #301741.
-## DP: http://bugs.mysql.com/bug.php?id=6901
-
-@DPATCH@
---- a/scripts/mysql_system_tables_data.sql
-+++ b/scripts/mysql_system_tables_data.sql
-@@ -27,15 +27,6 @@
- SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
-
-
---- Fill "db" table with default grants for anyone to
---- access database 'test' and 'test_%' if "db" table didn't exist
--CREATE TEMPORARY TABLE tmp_db LIKE db;
--INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');
--INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');
--INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
--DROP TABLE tmp_db;
--
--
- -- Fill "user" table with default users allowing root access
- -- from local machine if "user" table didn't exist before
- CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user;
-@@ -48,9 +39,6 @@ REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y'
- REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
- -- More secure root account using unix sucket auth.
- INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0);
---- Anonymous user with no privileges.
--INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost','');
--INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
-
- INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL;
- INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL;
diff --git a/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch b/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
deleted file mode 100755
index 9a063e408a5..00000000000
--- a/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 41_scripts__mysql_install_db.sh__no_test.dpatch by <ch@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: scripts__mysql_install_db.sh__no_test
-## DP: http://bugs.mysql.com/bug.php?id=6901
-
-@DPATCH@
-
---- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100
-+++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100
-@@ -407,7 +407,7 @@ then
- fi
-
- # Create database directories
--for dir in "$ldata" "$ldata/mysql" "$ldata/test"
-+for dir in "$ldata" "$ldata/mysql"
- do
- if test ! -d "$dir"
- then
diff --git a/debian/patches/50_mysql-test__db_test.dpatch b/debian/patches/50_mysql-test__db_test.dpatch
deleted file mode 100755
index ed2efb95998..00000000000
--- a/debian/patches/50_mysql-test__db_test.dpatch
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_mysql-test__db_test.dpatch by Christian Hammers <ch@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch 33_scripts__mysql_create_system_tables__no_test removes the
-## DP: rights for anybody to connect to the test database but the test
-## DP: suite depends on them.
-
-@DPATCH@
-
---- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200
-+++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200
-@@ -3180,6 +3180,11 @@ sub mysql_install_db {
- mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
- $bootstrap_sql_file);
-
-+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
-+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');\n");
-+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');\n");
-+
-+
- # Add test data for timezone - this is just a subset, on a real
- # system these tables will be populated either by mysql_tzinfo_to_sql
- # or by downloading the timezone table package from our website