1set @old_debug= @@debug_dbug; 2create user user_1; 3show grants for user_1; 4Grants for user_1@% 5GRANT USAGE ON *.* TO `user_1`@`%` 6# create user 7create database d; 8use d; 9 10#Completely Invisible 11set debug_dbug= "+d,test_completely_invisible"; 12create table t1(a int); 13insert into t1 values(1); 14select a,invisible from t1; 15a invisible 161 9 17set debug_dbug=@old_debug; 18grant insert(a) on t1 to user_1; 19grant update(a) on t1 to user_1; 20grant select(a) on t1 to user_1; 21grant delete on t1 to user_1; 22connect con1, localhost, user_1,,test; 23connection con1; 24select user(); 25user() 26user_1@localhost 27use d; 28select * from t1; 29a 301 31insert into t1 values(2); 32select * from t1; 33a 341 352 36insert into t1(a) values(3); 37select * from t1; 38a 391 402 413 42select invisible,a from t1; 43ERROR 42S22: Unknown column 'invisible' in 'field list' 44delete from t1 where a =1; 45update t1 set a=1 where a=3; 46select * from t1; 47a 482 491 50connection default; 51REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1; 52connection con1; 53select * from t1; 54ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1' 55select invisible from t1; 56ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1' 57disconnect con1; 58 59#Final Cleanup 60connection default; 61set debug_dbug= "+d,test_completely_invisible"; 62select a,invisible from t1; 63a invisible 642 9 651 9 66drop user user_1; 67drop database d; 68set @old_debug= @@debug_dbug; 69