File: fix_grant_user_lock_as_root.patch

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (85 lines) | stat: -rw-r--r-- 3,545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Description: Fixes test failing when run as root
 Certain tests will fail when run as root. This patch fixes one,
 main.grant_user_lock, which tries to test an anonymous user in
 a way that fails when running as root. The patch fixes only
 this test because there have been issues in Debian with only
 this test failing in this way.
Author: Lars Tangvald <lars.tangvald@oracle.com>
Bug-Debian: https://bugs.debian.org/841592
Bug: http://bugs.mysql.com/bug.php?id=83751
Last-Update: 2016-11-09

--- a/mysql-test/r/grant_user_lock.result
+++ b/mysql-test/r/grant_user_lock.result
@@ -98,13 +98,13 @@ CURRENT_USER()
 DROP USER ''@localhost;
 # Create anonymous user - LOCK
 CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK;
-connect(localhost,,pass,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost, ,pass,test,MASTER_PORT,MASTER_SOCKET);
 ERROR HY000: Access denied for user '(null)'@'localhost'. Account is locked.
 DROP USER ''@localhost;
 # Disabling anonymous user
 CREATE USER ''@localhost IDENTIFIED BY 'pass';
 ALTER USER ''@localhost ACCOUNT LOCK;
-connect(localhost,,pass,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost, ,pass,test,MASTER_PORT,MASTER_SOCKET);
 ERROR HY000: Access denied for user '(null)'@'localhost'. Account is locked.
 DROP USER ''@localhost;
 # Enabling anonymous user
--- a/mysql-test/t/grant_user_lock.test
+++ b/mysql-test/t/grant_user_lock.test
@@ -112,7 +112,7 @@ DROP USER unlocked_user2@localhost;
 --echo # Create anonymous user
 connection default;
 CREATE USER ''@localhost IDENTIFIED BY 'pass';
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 SELECT CURRENT_USER();
 disconnect anonymous_user_con;
 connection default;
@@ -121,7 +121,7 @@ DROP USER ''@localhost;
 --echo # Create anonymous user - explicit UNLOCK
 connection default;
 CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT UNLOCK;
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 SELECT CURRENT_USER();
 disconnect anonymous_user_con;
 connection default;
@@ -132,7 +132,7 @@ connection default;
 CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK;
 --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 --error ER_ACCOUNT_HAS_BEEN_LOCKED
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 connection default;
 DROP USER ''@localhost;
 
@@ -142,7 +142,7 @@ CREATE USER ''@localhost IDENTIFIED BY '
 ALTER USER ''@localhost ACCOUNT LOCK;
 --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 --error ER_ACCOUNT_HAS_BEEN_LOCKED
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 connection default;
 DROP USER ''@localhost;
 
@@ -150,7 +150,7 @@ DROP USER ''@localhost;
 connection default;
 CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK;
 ALTER USER ''@localhost ACCOUNT UNLOCK;
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 SELECT CURRENT_USER();
 disconnect anonymous_user_con;
 connection default;
@@ -170,7 +170,7 @@ connection default;
 CREATE user ''@localhost IDENTIFIED BY 'pass';
 CREATE USER 'unlocked_user'@localhost IDENTIFIED BY 'pass';
 
-connect(anonymous_user_con, localhost, '', pass);
+connect(anonymous_user_con, localhost, ' ', pass);
 --error ER_TABLEACCESS_DENIED_ERROR
 UPDATE mysql.user SET account_locked='Y'
   WHERE user='unlocked_user' and host = 'localhost';