Skip to content

Commit 242e7f9

Browse files
committed
MDEV-4549 [PATCH] Clean up code working with ACL tables
* enum values to index different ACL tables, instead of hard-coded numbers (even different in diffent functions). * move TABLE_LIST initialization into open_grant_tables() and use it everywhere * change few my_bool's to bool's
1 parent f321d3e commit 242e7f9

File tree

6 files changed

+261
-423
lines changed

6 files changed

+261
-423
lines changed

mysql-test/r/not_embedded_server.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
1+
call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
22
SHOW VARIABLES like 'slave_skip_errors';
33
Variable_name Value
44
slave_skip_errors OFF
@@ -16,7 +16,7 @@ DROP TABLE IF EXISTS t1;
1616
CREATE TABLE t1 (c1 INT);
1717
LOCK TABLES t1 READ;
1818
FLUSH PRIVILEGES;
19-
ERROR HY000: Table 'host' was not locked with LOCK TABLES
19+
ERROR HY000: Table 'user' was not locked with LOCK TABLES
2020
UNLOCK TABLES;
2121
DROP TABLE t1;
2222
#

mysql-test/r/sp-destruct.result

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,8 @@ CREATE FUNCTION f1() RETURNS INT RETURN 1;
128128
RENAME TABLE mysql.procs_priv TO procs_priv_backup;
129129
FLUSH TABLE mysql.procs_priv;
130130
DROP FUNCTION f1;
131-
ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
132131
SHOW WARNINGS;
133132
Level Code Message
134-
Error 1146 Table 'mysql.procs_priv' doesn't exist
135-
Warning 1405 Failed to revoke all privileges to dropped routine
136133
# Restore the procs_priv table
137134
RENAME TABLE procs_priv_backup TO mysql.procs_priv;
138135
FLUSH TABLE mysql.procs_priv;

mysql-test/t/not_embedded_server.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# End of 4.1 tests
88

9-
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
9+
call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
1010

1111
#
1212
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors

mysql-test/t/sp-destruct.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ RENAME TABLE mysql.procs_priv TO procs_priv_backup;
214214
FLUSH TABLE mysql.procs_priv;
215215

216216
# DROP FUNCTION used to cause an assert.
217-
--error ER_NO_SUCH_TABLE
218217
DROP FUNCTION f1;
219218
SHOW WARNINGS;
220219

0 commit comments

Comments
 (0)