summaryrefslogtreecommitdiff
path: root/debian/patches/scripts__mysql_create_system_tables__no_test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/scripts__mysql_create_system_tables__no_test.patch')
-rw-r--r--debian/patches/scripts__mysql_create_system_tables__no_test.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/scripts__mysql_create_system_tables__no_test.patch b/debian/patches/scripts__mysql_create_system_tables__no_test.patch
new file mode 100644
index 0000000..f425651
--- /dev/null
+++ b/debian/patches/scripts__mysql_create_system_tables__no_test.patch
@@ -0,0 +1,36 @@
+From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
+Date: Thu, 10 Aug 2017 20:40:27 +0200
+Subject: scripts__mysql_create_system_tables__no_test
+
+## 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
+---
+ scripts/mysql_system_tables_data.sql | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
+index 9556e7b..0783f3d 100644
+--- a/scripts/mysql_system_tables_data.sql
++++ b/scripts/mysql_system_tables_data.sql
+@@ -26,16 +26,6 @@
+ -- a plain character
+ 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');
+-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');
+-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;