Gbase中rename表所需要的最小权限

Gbase中如果要rename一张表,所需要的最小权限
以y4用户执行rename表的操作
gbase> alter table t8 rename to t88;
ERROR 1142 (42000): DROP,ALTER command denied to user ‘y4’@‘127.0.0.1’ for table ‘t8
gbase>
gbase> alter table t8 rename to t88;
ERROR 1142 (42000): INSERT,CREATE command denied to user ‘y4’@‘127.0.0.1’ for table ‘t88
gbase>
gbase> alter table t8 rename to t88;
Query OK, 0 rows affected (Elapsed: 00:00:00.23)
gbase> show grants for y4;
±--------------------------------------------------------------------------------------------------+
| Grants for y4@% |
±--------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO ‘y4’@’%’ IDENTIFIED BY PASSWORD ‘E7E7’ |
| GRANT SELECT ON “testdb”. TO ‘y4’@’%’ |
| GRANT INSERT, CREATE ON “testdb”.“t88” TO ‘y4’@’%’ |
| GRANT DROP, ALTER ON “testdb”.“t8” TO ‘y4’@’%’ |
±--------------------------------------------------------------------------------------------------+
4 rows in set (Elapsed: 00:00:00.00)
gbase中对大表进行rename的操作,一闪而过,rename命令会直接修改底层的.frm文件,以及变更了数据字典中的table name,不会真的重新建表迁移数据。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值