1#! /bin/sh /usr/share/dpatch/dpatch-run
2##
3## All lines beginning with `## DP:' are a description of the patch.
4## DP: 20_scripts__mysql_create_system_tables__no_test.patch by <ch@debian.org>
5
6@DPATCH@
7
820_scripts__mysql_create_system_tables__no_test.patch by <ch@debian.org>
9
10A user with no password prevents a normal user from login under certain
11circumstances as it is checked first. See #301741.
12http://bugs.mysql.com/bug.php?id=6901
13--- a/scripts/mysql_system_tables_data.sql
14+++ b/scripts/mysql_system_tables_data.sql
15@@ -26,8 +26,6 @@
16 -- Fill "db" table with default grants for anyone to
17 -- access database 'test' and 'test_%' if "db" table didn't exist
18 CREATE TEMPORARY TABLE tmp_db LIKE db;
19-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');
20-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');
21 INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
22 DROP TABLE tmp_db;
23
24@@ -40,8 +38,6 @@
25 REPLACE INTO tmp_user SELECT @current_hostname,'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','','','','',0,0,0,0,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost';
26 REPLACE INTO tmp_user VALUES ('127.0.0.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','','','','',0,0,0,0,'','','N');
27 REPLACE INTO tmp_user 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','','','','',0,0,0,0,'','','N');
28-INSERT INTO tmp_user (host,user) VALUES ('localhost','');
29-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
30 INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
31 DROP TABLE tmp_user;
32
33