#At file:///home/ram/mysql/mysql-next-mr-bugfixing/ based on revid:sven.sandberg@stripped
3355 Ramil Kalimullin 2010-11-03 [merge]
Manual merge from mysql-trunk-bugfixing.
modified:
cmake/mysql_version.cmake
mysql-test/r/1st.result
mysql-test/r/connect.result
mysql-test/r/information_schema.result
mysql-test/r/log_tables_upgrade.result
mysql-test/r/mysql_upgrade.result
mysql-test/r/mysql_upgrade_ssl.result
mysql-test/r/mysqlcheck.result
mysql-test/r/plugin_auth.result
mysql-test/r/system_mysql_db.result
mysql-test/suite/funcs_1/r/is_columns_mysql.result
mysql-test/suite/funcs_1/r/is_key_column_usage.result
mysql-test/suite/funcs_1/r/is_statistics.result
mysql-test/suite/funcs_1/r/is_statistics_mysql.result
mysql-test/suite/funcs_1/r/is_table_constraints.result
mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
mysql-test/suite/funcs_1/r/is_tables_mysql.result
mysql-test/suite/perfschema/r/privilege_table_io.result
mysql-test/t/plugin_auth.test
mysql-test/t/system_mysql_db_fix40123.test
mysql-test/t/system_mysql_db_fix50030.test
mysql-test/t/system_mysql_db_fix50117.test
scripts/mysql_system_tables.sql
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_fix.sql
sql/sql_acl.cc
sql/sql_show.cc
support-files/mysql.spec.sh
=== modified file 'cmake/mysql_version.cmake'
--- a/cmake/mysql_version.cmake 2010-06-21 13:20:18 +0000
+++ b/cmake/mysql_version.cmake 2010-11-02 20:32:38 +0000
@@ -42,6 +42,9 @@ MACRO(GET_MYSQL_VERSION)
IF(NOT VERSION_STRING)
FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
+ IF(NOT VERSION_STRING)
+ STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
+ ENDIF()
ENDIF()
ENDIF()
ENDIF()
=== modified file 'mysql-test/r/1st.result'
--- a/mysql-test/r/1st.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/1st.result 2010-11-03 14:31:27 +0000
@@ -21,7 +21,7 @@ ndb_binlog_index
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
=== modified file 'mysql-test/r/connect.result'
--- a/mysql-test/r/connect.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/connect.result 2010-11-03 14:31:27 +0000
@@ -15,7 +15,7 @@ ndb_binlog_index
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
@@ -49,7 +49,7 @@ ndb_binlog_index
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
@@ -91,7 +91,7 @@ ndb_binlog_index
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result 2010-10-25 12:13:13 +0000
+++ b/mysql-test/r/information_schema.result 2010-11-03 14:31:27 +0000
@@ -88,7 +88,7 @@ host
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
=== modified file 'mysql-test/r/log_tables_upgrade.result'
--- a/mysql-test/r/log_tables_upgrade.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/log_tables_upgrade.result 2010-11-03 14:31:27 +0000
@@ -27,7 +27,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.renamed_general_log OK
mysql.servers OK
mysql.slow_log OK
=== modified file 'mysql-test/r/mysql_upgrade.result'
--- a/mysql-test/r/mysql_upgrade.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/mysql_upgrade.result 2010-11-03 14:31:27 +0000
@@ -15,7 +15,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
@@ -44,7 +44,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
@@ -73,7 +73,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
@@ -104,7 +104,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
@@ -139,7 +139,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
@@ -177,7 +177,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
=== modified file 'mysql-test/r/mysql_upgrade_ssl.result'
--- a/mysql-test/r/mysql_upgrade_ssl.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/mysql_upgrade_ssl.result 2010-11-03 14:31:27 +0000
@@ -17,7 +17,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
=== modified file 'mysql-test/r/mysqlcheck.result'
--- a/mysql-test/r/mysqlcheck.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/mysqlcheck.result 2010-11-03 14:31:27 +0000
@@ -18,7 +18,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log
note : The storage engine for the table doesn't support analyze
@@ -46,7 +46,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log
note : The storage engine for the table doesn't support optimize
@@ -72,7 +72,7 @@ mysql.ndb_binlog_index
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
-mysql.proxy_priv OK
+mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log
note : The storage engine for the table doesn't support analyze
@@ -98,7 +98,7 @@ mysql.ndb_binlog_index
mysql.plugin Table is already up to date
mysql.proc Table is already up to date
mysql.procs_priv Table is already up to date
-mysql.proxy_priv Table is already up to date
+mysql.proxies_priv Table is already up to date
mysql.servers Table is already up to date
mysql.slow_log
note : The storage engine for the table doesn't support optimize
=== modified file 'mysql-test/r/plugin_auth.result'
--- a/mysql-test/r/plugin_auth.result 2010-10-04 13:09:37 +0000
+++ b/mysql-test/r/plugin_auth.result 2010-11-03 11:47:22 +0000
@@ -11,6 +11,26 @@ test_plugin_server plug_dest
## test plugin auth
ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
GRANT PROXY ON plug_dest TO plug;
+test proxies_priv columns
+SELECT * FROM mysql.proxies_priv;
+Host User Proxied_host Proxied_user With_grant Grantor Timestamp
+xx root 1 xx
+xx root 1 xx
+xx plug % plug_dest 0 root@localhost xx
+test mysql.proxies_priv;
+SHOW CREATE TABLE mysql.proxies_priv;
+Table Create Table
+proxies_priv CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'
select USER(),CURRENT_USER();
USER() CURRENT_USER()
plug@localhost plug_dest@%
@@ -146,8 +166,8 @@ Grants for test_drop@localhost
GRANT USAGE ON *.* TO 'test_drop'@'localhost'
GRANT PROXY ON 'future_user'@'%' TO 'test_drop'@'localhost'
DROP USER test_drop@localhost;
-SELECT * FROM mysql.proxy_priv WHERE Host = 'test_drop' AND User = 'localhost';
-Host User Proxied_Host Proxied_User With_Grant
+SELECT * FROM mysql.proxies_priv WHERE Host = 'test_drop' AND User = 'localhost';
+Host User Proxied_host Proxied_user With_grant Grantor Timestamp
DROP USER proxy_admin;
DROP USER grant_plug,grant_plug_dest,grant_plug_dest2;
## END GRANT PROXY tests
=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/r/system_mysql_db.result 2010-11-03 14:31:27 +0000
@@ -14,7 +14,7 @@ ndb_binlog_index
plugin
proc
procs_priv
-proxy_priv
+proxies_priv
servers
slow_log
tables_priv
=== modified file 'mysql-test/suite/funcs_1/r/is_columns_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2010-11-03 14:31:27 +0000
@@ -134,11 +134,13 @@ def mysql procs_priv Routine_name 4 NO
def mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references
def mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
def mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
-def mysql proxy_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
-def mysql proxy_priv Proxied_Host 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
-def mysql proxy_priv Proxied_User 4 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
-def mysql proxy_priv User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
-def mysql proxy_priv With_Grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
+def mysql proxies_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
+def mysql proxies_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
+def mysql proxies_priv Proxied_host 3 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
+def mysql proxies_priv Proxied_user 4 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
+def mysql proxies_priv Timestamp 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql proxies_priv User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
+def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
def mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
def mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
def mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -425,11 +427,13 @@ NULL mysql proc modified timestamp NULL
3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77)
3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
-3.0000 mysql proxy_priv Host char 60 180 utf8 utf8_bin char(60)
-3.0000 mysql proxy_priv User char 16 48 utf8 utf8_bin char(16)
-3.0000 mysql proxy_priv Proxied_Host char 16 48 utf8 utf8_bin char(16)
-3.0000 mysql proxy_priv Proxied_User char 60 180 utf8 utf8_bin char(60)
-NULL mysql proxy_priv With_Grant tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql proxies_priv Host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql proxies_priv User char 16 48 utf8 utf8_bin char(16)
+3.0000 mysql proxies_priv Proxied_host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql proxies_priv Proxied_user char 16 48 utf8 utf8_bin char(16)
+NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1)
+3.0000 mysql proxies_priv Grantor char 77 231 utf8 utf8_bin char(77)
+NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
=== modified file 'mysql-test/suite/funcs_1/r/is_key_column_usage.result'
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result 2010-11-03 14:31:27 +0000
@@ -106,10 +106,10 @@ def mysql PRIMARY def mysql procs_priv D
def mysql PRIMARY def mysql procs_priv User
def mysql PRIMARY def mysql procs_priv Routine_name
def mysql PRIMARY def mysql procs_priv Routine_type
-def mysql PRIMARY def mysql proxy_priv Host
-def mysql PRIMARY def mysql proxy_priv User
-def mysql PRIMARY def mysql proxy_priv Proxied_Host
-def mysql PRIMARY def mysql proxy_priv Proxied_User
+def mysql PRIMARY def mysql proxies_priv Host
+def mysql PRIMARY def mysql proxies_priv User
+def mysql PRIMARY def mysql proxies_priv Proxied_host
+def mysql PRIMARY def mysql proxies_priv Proxied_user
def mysql PRIMARY def mysql servers Server_name
def mysql PRIMARY def mysql tables_priv Host
def mysql PRIMARY def mysql tables_priv Db
=== modified file 'mysql-test/suite/funcs_1/r/is_statistics.result'
--- a/mysql-test/suite/funcs_1/r/is_statistics.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result 2010-11-03 14:31:27 +0000
@@ -118,10 +118,11 @@ def mysql procs_priv mysql PRIMARY
def mysql procs_priv mysql PRIMARY
def mysql procs_priv mysql PRIMARY
def mysql procs_priv mysql Grantor
-def mysql proxy_priv mysql PRIMARY
-def mysql proxy_priv mysql PRIMARY
-def mysql proxy_priv mysql PRIMARY
-def mysql proxy_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql PRIMARY
+def mysql proxies_priv mysql Grantor
def mysql servers mysql PRIMARY
def mysql tables_priv mysql PRIMARY
def mysql tables_priv mysql PRIMARY
=== modified file 'mysql-test/suite/funcs_1/r/is_statistics_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result 2010-11-03 14:31:27 +0000
@@ -40,10 +40,11 @@ def mysql procs_priv 0 mysql PRIMARY 2 D
def mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE
def mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE
-def mysql proxy_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql proxy_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
-def mysql proxy_priv 0 mysql PRIMARY 3 Proxied_Host A #CARD# NULL NULL BTREE
-def mysql proxy_priv 0 mysql PRIMARY 4 Proxied_User A #CARD# NULL NULL BTREE
+def mysql proxies_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
+def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
+def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
+def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
=== modified file 'mysql-test/suite/funcs_1/r/is_table_constraints.result'
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result 2010-11-03 14:31:27 +0000
@@ -73,7 +73,7 @@ def mysql PRIMARY mysql ndb_binlog_index
def mysql PRIMARY mysql plugin
def mysql PRIMARY mysql proc
def mysql PRIMARY mysql procs_priv
-def mysql PRIMARY mysql proxy_priv
+def mysql PRIMARY mysql proxies_priv
def mysql PRIMARY mysql servers
def mysql PRIMARY mysql tables_priv
def mysql PRIMARY mysql time_zone
=== modified file 'mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result 2010-11-03 14:31:27 +0000
@@ -23,7 +23,7 @@ def mysql PRIMARY mysql ndb_binlog_index
def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY
-def mysql PRIMARY mysql proxy_priv PRIMARY KEY
+def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql time_zone PRIMARY KEY
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2010-10-21 12:18:25 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2010-11-03 14:31:27 +0000
@@ -336,7 +336,7 @@ user_comment Procedure privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME proxy_priv
+TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
=== modified file 'mysql-test/suite/perfschema/r/privilege_table_io.result'
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result 2010-10-21 09:49:16 +0000
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result 2010-11-03 14:31:27 +0000
@@ -69,9 +69,9 @@ wait/io/table/sql/handler handler.cc: TA
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql proxy_priv fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql proxy_priv fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql proxy_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL
=== modified file 'mysql-test/t/plugin_auth.test'
--- a/mysql-test/t/plugin_auth.test 2010-09-20 13:51:42 +0000
+++ b/mysql-test/t/plugin_auth.test 2010-11-03 11:47:22 +0000
@@ -16,6 +16,11 @@ connect(plug_con,localhost,plug,plug_des
--enable_query_log
GRANT PROXY ON plug_dest TO plug;
+--echo test proxies_priv columns
+--replace_column 1 xx 7 xx
+SELECT * FROM mysql.proxies_priv;
+--echo test mysql.proxies_priv;
+SHOW CREATE TABLE mysql.proxies_priv;
connect(plug_con,localhost,plug,plug_dest);
@@ -226,7 +231,7 @@ CREATE USER test_drop@localhost;
GRANT PROXY ON future_user TO test_drop@localhost;
SHOW GRANTS FOR test_drop@localhost;
DROP USER test_drop@localhost;
-SELECT * FROM mysql.proxy_priv WHERE Host = 'test_drop' AND User = 'localhost';
+SELECT * FROM mysql.proxies_priv WHERE Host = 'test_drop' AND User = 'localhost';
DROP USER proxy_admin;
=== modified file 'mysql-test/t/system_mysql_db_fix40123.test'
--- a/mysql-test/t/system_mysql_db_fix40123.test 2010-10-21 12:18:25 +0000
+++ b/mysql-test/t/system_mysql_db_fix40123.test 2010-11-03 14:31:27 +0000
@@ -72,7 +72,7 @@ CREATE TABLE time_zone_leap_second ( T
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxy_priv;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv;
-- enable_query_log
=== modified file 'mysql-test/t/system_mysql_db_fix50030.test'
--- a/mysql-test/t/system_mysql_db_fix50030.test 2010-10-21 12:18:25 +0000
+++ b/mysql-test/t/system_mysql_db_fix50030.test 2010-11-03 14:31:27 +0000
@@ -78,7 +78,7 @@ INSERT INTO servers VALUES ('test','loca
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxy_priv;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv;
-- enable_query_log
=== modified file 'mysql-test/t/system_mysql_db_fix50117.test'
--- a/mysql-test/t/system_mysql_db_fix50117.test 2010-10-21 12:18:25 +0000
+++ b/mysql-test/t/system_mysql_db_fix50117.test 2010-11-03 14:31:27 +0000
@@ -97,7 +97,7 @@ CREATE TABLE IF NOT EXISTS ndb_binlog_in
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxy_priv;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv;
-- enable_query_log
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql 2010-11-02 11:53:54 +0000
+++ b/scripts/mysql_system_tables.sql 2010-11-03 14:31:27 +0000
@@ -502,7 +502,7 @@ PREPARE stmt FROM @str;
EXECUTE stmt;
DROP PREPARE stmt;
-CREATE TABLE IF NOT EXISTS proxy_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_Host char(16) binary DEFAULT '' NOT NULL, Proxied_User char(60) binary DEFAULT '' NOT NULL, With_Grant BOOL DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User,Proxied_Host,Proxied_User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
+CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(16) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY Host (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
--- Remember for later if proxy_priv table already existed
-set @had_proxy_priv_table= @@warning_count != 0;
+-- Remember for later if proxies_priv table already existed
+set @had_proxies_priv_table= @@warning_count != 0;
=== modified file 'scripts/mysql_system_tables_data.sql'
--- a/scripts/mysql_system_tables_data.sql 2010-08-09 08:32:50 +0000
+++ b/scripts/mysql_system_tables_data.sql 2010-11-02 15:45:26 +0000
@@ -30,8 +30,8 @@ INSERT INTO tmp_user (host,user) SELECT
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;
-CREATE TEMPORARY TABLE tmp_proxy_priv LIKE proxy_priv;
-INSERT INTO tmp_proxy_priv VALUES ('localhost', 'root', '', '', TRUE);
-REPLACE INTO tmp_proxy_priv SELECT @current_hostname, 'root', '', '', TRUE FROM DUAL WHERE LOWER (@current_hostname) != 'localhost';
-INSERT INTO proxy_priv SELECT * FROM tmp_proxy_priv WHERE @had_proxy_priv_table=0;
-DROP TABLE tmp_proxy_priv;
+CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
+INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now());
+REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost';
+INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
+DROP TABLE tmp_proxies_priv;
=== modified file 'scripts/mysql_system_tables_fix.sql'
--- a/scripts/mysql_system_tables_fix.sql 2010-10-04 15:25:10 +0000
+++ b/scripts/mysql_system_tables_fix.sql 2010-11-03 11:51:15 +0000
@@ -643,7 +643,7 @@ drop procedure mysql.die;
ALTER TABLE user ADD plugin char(60) DEFAULT '' NOT NULL, ADD authentication_string TEXT NOT NULL;
ALTER TABLE user MODIFY plugin char(60) DEFAULT '' NOT NULL;
-CREATE TABLE IF NOT EXISTS proxy_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_User char(60) binary DEFAULT '' NOT NULL, Proxied_Host char(16) binary DEFAULT '' NOT NULL, With_Grant BOOL DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User,Proxied_Host,Proxied_User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(16) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY Host (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above
=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc 2010-10-27 10:47:14 +0000
+++ b/sql/sql_acl.cc 2010-11-03 14:31:27 +0000
@@ -268,11 +268,13 @@ class ACL_PROXY_USER :public ACL_ACCESS
bool with_grant;
typedef enum {
- MYSQL_PROXY_PRIV_HOST,
- MYSQL_PROXY_PRIV_USER,
- MYSQL_PROXY_PRIV_PROXIED_HOST,
- MYSQL_PROXY_PRIV_PROXIED_USER,
- MYSQL_PROXY_PRIV_WITH_GRANT } old_acl_proxy_users;
+ MYSQL_PROXIES_PRIV_HOST,
+ MYSQL_PROXIES_PRIV_USER,
+ MYSQL_PROXIES_PRIV_PROXIED_HOST,
+ MYSQL_PROXIES_PRIV_PROXIED_USER,
+ MYSQL_PROXIES_PRIV_WITH_GRANT,
+ MYSQL_PROXIES_PRIV_GRANTOR,
+ MYSQL_PROXIES_PRIV_TIMESTAMP } old_acl_proxy_users;
public:
ACL_PROXY_USER () {};
@@ -308,11 +310,11 @@ public:
void init(TABLE *table, MEM_ROOT *mem)
{
- init (get_field(mem, table->field[MYSQL_PROXY_PRIV_HOST]),
- get_field(mem, table->field[MYSQL_PROXY_PRIV_USER]),
- get_field(mem, table->field[MYSQL_PROXY_PRIV_PROXIED_HOST]),
- get_field(mem, table->field[MYSQL_PROXY_PRIV_PROXIED_USER]),
- table->field[MYSQL_PROXY_PRIV_WITH_GRANT]->val_int() != 0);
+ init (get_field(mem, table->field[MYSQL_PROXIES_PRIV_HOST]),
+ get_field(mem, table->field[MYSQL_PROXIES_PRIV_USER]),
+ get_field(mem, table->field[MYSQL_PROXIES_PRIV_PROXIED_HOST]),
+ get_field(mem, table->field[MYSQL_PROXIES_PRIV_PROXIED_USER]),
+ table->field[MYSQL_PROXIES_PRIV_WITH_GRANT]->val_int() != 0);
}
bool get_with_grant() { return with_grant; }
@@ -337,7 +339,7 @@ public:
(hostname_requires_resolving(host.hostname) ||
hostname_requires_resolving(proxied_host.hostname)))
{
- sql_print_warning("'proxy_priv' entry '%s@%s %s@%s' "
+ sql_print_warning("'proxes_priv' entry '%s@%s %s@%s' "
"ignored in --skip-name-resolve mode.",
proxied_user ? proxied_user : "",
proxied_host.hostname ? proxied_host.hostname : "",
@@ -452,19 +454,19 @@ public:
user->str ? user->str : "<NULL>",
proxied_host->str ? proxied_host->str : "<NULL>",
proxied_user->str ? proxied_user->str : "<NULL>"));
- if (table->field[MYSQL_PROXY_PRIV_HOST]->store(host->str,
+ if (table->field[MYSQL_PROXIES_PRIV_HOST]->store(host->str,
host->length,
system_charset_info))
DBUG_RETURN(TRUE);
- if (table->field[MYSQL_PROXY_PRIV_USER]->store(user->str,
+ if (table->field[MYSQL_PROXIES_PRIV_USER]->store(user->str,
user->length,
system_charset_info))
DBUG_RETURN(TRUE);
- if (table->field[MYSQL_PROXY_PRIV_PROXIED_HOST]->store(proxied_host->str,
+ if (table->field[MYSQL_PROXIES_PRIV_PROXIED_HOST]->store(proxied_host->str,
proxied_host->length,
system_charset_info))
DBUG_RETURN(TRUE);
- if (table->field[MYSQL_PROXY_PRIV_PROXIED_USER]->store(proxied_user->str,
+ if (table->field[MYSQL_PROXIES_PRIV_PROXIED_USER]->store(proxied_user->str,
proxied_user->length,
system_charset_info))
DBUG_RETURN(TRUE);
@@ -472,20 +474,25 @@ public:
DBUG_RETURN(FALSE);
}
- static int store_data_record(TABLE *table,
- const LEX_STRING *host,
+ static int store_data_record(TABLE *table,
+ const LEX_STRING *host,
const LEX_STRING *user,
- const LEX_STRING *proxied_host,
+ const LEX_STRING *proxied_host,
const LEX_STRING *proxied_user,
- bool with_grant)
+ bool with_grant,
+ const char *grantor)
{
- DBUG_ENTER ("ACL_PROXY_USER::store_pk");
- if (store_pk (table, host, user, proxied_host, proxied_user))
+ DBUG_ENTER("ACL_PROXY_USER::store_pk");
+ if (store_pk(table, host, user, proxied_host, proxied_user))
DBUG_RETURN(TRUE);
- DBUG_PRINT ("info", ("with_grant=%s", with_grant ? "TRUE" : "FALSE"));
- if (table->field[MYSQL_PROXY_PRIV_WITH_GRANT]->store(with_grant ? 1 : 0,
+ DBUG_PRINT("info", ("with_grant=%s", with_grant ? "TRUE" : "FALSE"));
+ if (table->field[MYSQL_PROXIES_PRIV_WITH_GRANT]->store(with_grant ? 1 : 0,
TRUE))
DBUG_RETURN(TRUE);
+ if (table->field[MYSQL_PROXIES_PRIV_GRANTOR]->store(grantor,
+ strlen(grantor),
+ system_charset_info))
+ DBUG_RETURN(TRUE);
DBUG_RETURN(FALSE);
}
@@ -1113,8 +1120,8 @@ my_bool acl_reload(THD *thd)
tables[2].init_one_table(C_STRING_WITH_LEN("mysql"),
C_STRING_WITH_LEN("db"), "db", TL_READ);
tables[3].init_one_table(C_STRING_WITH_LEN("mysql"),
- C_STRING_WITH_LEN("proxy_priv"),
- "proxy_priv", TL_READ);
+ C_STRING_WITH_LEN("proxies_priv"),
+ "proxies_priv", TL_READ);
tables[0].next_local= tables[0].next_global= tables + 1;
tables[1].next_local= tables[1].next_global= tables + 2;
tables[2].next_local= tables[2].next_global= tables + 3;
@@ -2608,7 +2615,7 @@ acl_insert_proxy_user(ACL_PROXY_USER *ne
static int
-replace_proxy_priv_table(THD *thd, TABLE *table, const LEX_USER *user,
+replace_proxies_priv_table(THD *thd, TABLE *table, const LEX_USER *user,
const LEX_USER *proxied_user, bool with_grant_arg,
bool revoke_grant)
{
@@ -2616,8 +2623,9 @@ replace_proxy_priv_table(THD *thd, TABLE
int error;
uchar user_key[MAX_KEY_LENGTH];
ACL_PROXY_USER new_grant;
+ char grantor[USER_HOST_BUFF_SIZE];
- DBUG_ENTER("replace_proxy_priv_table");
+ DBUG_ENTER("replace_proxies_priv_table");
if (!initialized)
{
@@ -2639,6 +2647,8 @@ replace_proxy_priv_table(THD *thd, TABLE
key_copy(user_key, table->record[0], table->key_info,
table->key_info->key_length);
+ get_grantor(thd, grantor);
+
table->file->ha_index_init(0, 1);
if (table->file->ha_index_read_map(table->record[0], user_key,
HA_WHOLE_KEY,
@@ -2655,7 +2665,8 @@ replace_proxy_priv_table(THD *thd, TABLE
ACL_PROXY_USER::store_data_record(table, &user->host, &user->user,
&proxied_user->host,
&proxied_user->user,
- with_grant_arg);
+ with_grant_arg,
+ grantor);
}
else
{
@@ -2712,7 +2723,7 @@ table_error:
table->file->print_error(error, MYF(0)); /* purecov: inspected */
abort:
- DBUG_PRINT("info", ("aborting replace_proxy_priv_table"));
+ DBUG_PRINT("info", ("aborting replace_proxies_priv_table"));
table->file->ha_index_end();
DBUG_RETURN(-1);
}
@@ -3977,14 +3988,14 @@ bool mysql_grant(THD *thd, const char *d
proxied_user= str_list++;
}
- /* open the mysql.user and mysql.db or mysql.proxy_priv tables */
+ /* open the mysql.user and mysql.db or mysql.proxies_priv tables */
tables[0].init_one_table(C_STRING_WITH_LEN("mysql"),
C_STRING_WITH_LEN("user"), "user", TL_WRITE);
if (is_proxy)
tables[1].init_one_table(C_STRING_WITH_LEN("mysql"),
- C_STRING_WITH_LEN("proxy_priv"),
- "proxy_priv",
+ C_STRING_WITH_LEN("proxies_priv"),
+ "proxies_priv",
TL_WRITE);
else
tables[1].init_one_table(C_STRING_WITH_LEN("mysql"),
@@ -4078,7 +4089,7 @@ bool mysql_grant(THD *thd, const char *d
}
else if (is_proxy)
{
- if (replace_proxy_priv_table (thd, tables[1].table, Str, proxied_user,
+ if (replace_proxies_priv_table (thd, tables[1].table, Str, proxied_user,
rights & GRANT_ACL ? TRUE : FALSE,
revoke_grant))
result= -1;
@@ -5711,8 +5722,8 @@ int open_grant_tables(THD *thd, TABLE_LI
C_STRING_WITH_LEN("procs_priv"),
"procs_priv", TL_WRITE);
(tables+5)->init_one_table(C_STRING_WITH_LEN("mysql"),
- C_STRING_WITH_LEN("proxy_priv"),
- "proxy_priv", TL_WRITE);
+ C_STRING_WITH_LEN("proxies_priv"),
+ "proxies_priv", TL_WRITE);
tables->next_local= tables->next_global= tables + 1;
(tables+1)->next_local= (tables+1)->next_global= tables + 2;
(tables+2)->next_local= (tables+2)->next_global= tables + 3;
@@ -6304,7 +6315,7 @@ static int handle_grant_data(TABLE_LIST
}
}
- /* Handle proxy_priv table. */
+ /* Handle proxies_priv table. */
if ((found= handle_grant_table(tables, 5, drop, user_from, user_to)) < 0)
{
/* Handle of table failed, don't touch the in-memory array. */
@@ -6312,7 +6323,7 @@ static int handle_grant_data(TABLE_LIST
}
else
{
- /* Handle proxy_priv array. */
+ /* Handle proxies_priv array. */
if ((handle_grant_struct(5, drop, user_from, user_to) && !result) ||
found)
result= 1; /* At least one record/element found. */
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2010-10-27 10:28:09 +0000
+++ b/sql/sql_show.cc 2010-11-03 14:31:27 +0000
@@ -480,12 +480,6 @@ find_files(THD *thd, List<LEX_STRING> *f
else if (wild_compare(uname, wild, 0))
continue;
}
- if (!(file_name=
- thd->make_lex_string(file_name, uname, file_name_len, TRUE)))
- {
- my_dirend(dirp);
- DBUG_RETURN(FIND_FILES_OOM);
- }
}
else
{
=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh 2010-10-06 13:23:46 +0000
+++ b/support-files/mysql.spec.sh 2010-11-02 18:54:58 +0000
@@ -977,6 +977,9 @@ echo "====="
%attr(755, root, root) %{_libdir}/mysql/plugin/auth.so
%attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
%attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
@@ -985,6 +988,9 @@ echo "====="
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
%if %{WITH_TCMALLOC}
%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
No bundle (reason: revision is a merge).
| Thread |
|---|
| • bzr commit into mysql-next-mr-bugfixing branch (ramil:3355) | Ramil Kalimullin | 3 Nov |