Skip to content

Commit e37700a

Browse files
author
Arun Kuruvila
committed
1 parent 5795152 commit e37700a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

mysql-test/r/grant_debug.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CREATE USER user_name_robert_golebiowski@oh_my_gosh_this_is_a_long_hostname_look
6767
ERROR HY000: Cannot load from mysql.procs_priv. The table is probably corrupted
6868
GRANT ALL PRIVILEGES ON *.* TO user_name_robert_golebiowski@oh_my_gosh_this_is_a_long_hostname_look_at_it_it_has_60_char WITH GRANT OPTION;
6969
ERROR 42000: Can't find any matching row in the user table
70-
connect(localhost,user_name_robert_golebiowski,,test,13000,/home/arun/git_childs/bps21/23295423/dbg/mysql-test/var/tmp/mysqld.1.sock);
70+
connect(localhost,user_name_robert_golebiowski,,test,MASTER_PORT,MASTER_SOCKET);
7171
ERROR 28000: Access denied for user 'user_name_robert_golebiowski'@'localhost' (using password: NO)
7272
# This will change CURRENT_USER from user_name_robert_golebiowski@localhost to
7373
# user_name_robert_golebiowski@oh_my_gosh_this_is_a_long_hostname_look_at_it_it_has_60_char
@@ -104,7 +104,7 @@ CREATE USER robert_golebiows@localhost;
104104
ERROR HY000: Cannot load from mysql.procs_priv. The table is probably corrupted
105105
GRANT ALL PRIVILEGES ON *.* TO robert_golebiows@localhost WITH GRANT OPTION;
106106
ERROR 42000: Can't find any matching row in the user table
107-
connect(localhost,robert_golebiows,,test,13000,/home/arun/git_childs/bps21/23295423/dbg/mysql-test/var/tmp/mysqld.1.sock);
107+
connect(localhost,robert_golebiows,,test,MASTER_PORT,MASTER_SOCKET);
108108
ERROR 28000: Access denied for user 'robert_golebiows'@'localhost' (using password: NO)
109109
# Again we change localhost to oh_my_gosh_this_is_a_long_hostname_look_at_it_it_has_60_char
110110
# for CURRENT_USER

mysql-test/r/mysql_upgrade.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,7 @@ SET sql_mode= @orig_sql_mode;
26202620
Warnings:
26212621
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
26222622
Run mysql_upgrade
2623-
mysql_upgrade: (non fatal) [ERROR] 1728: Incorrect definition of table mysql.proc: expected column 'comment' at position 15 to have type text, found type blob.
2623+
mysql_upgrade: (non fatal) [ERROR] 1728: Cannot load from mysql.proc. The table is probably corrupted
26242624
mysql.columns_priv OK
26252625
mysql.db OK
26262626
mysql.engine_cost OK

mysql-test/t/grant_debug.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ CREATE USER user_name_robert_golebiowski@oh_my_gosh_this_is_a_long_hostname_look
8383
--error ER_PASSWORD_NO_MATCH
8484
GRANT ALL PRIVILEGES ON *.* TO user_name_robert_golebiowski@oh_my_gosh_this_is_a_long_hostname_look_at_it_it_has_60_char WITH GRANT OPTION;
8585

86+
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
8687
--error ER_ACCESS_DENIED_ERROR
8788
connect (con_grant,localhost,user_name_robert_golebiowski,,);
8889

@@ -124,6 +125,7 @@ CREATE USER robert_golebiows@localhost;
124125
--error ER_PASSWORD_NO_MATCH
125126
GRANT ALL PRIVILEGES ON *.* TO robert_golebiows@localhost WITH GRANT OPTION;
126127

128+
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
127129
--error ER_ACCESS_DENIED_ERROR
128130
connect (con_grant_2,localhost,robert_golebiows,,);
129131

sql/auth/sql_auth_cache.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form)
704704
cols= (ulong) form->field[MYSQL_TABLES_PRIV_FIELD_COLUMN_PRIV]->val_int();
705705
cols = fix_rights_for_column(cols);
706706
}
707+
else
708+
cols= 0;
707709

708710
(void) my_hash_init2(&hash_columns,4,system_charset_info,
709711
0,0,0, (my_hash_get_key) get_key_column,0,0,

0 commit comments

Comments
 (0)