MySQL [test]> repair table test.t1;ERROR 664 (HY000): Proxy ERROR:SQL is too complex, only applicable to noshard table: Shard table do not support repairMySQL [test]> /*sets:allsets*/repair table test.t1;+———+——–+———-+———-+——————+| Table | Op | Msg_type | Msg_text | info |+———+——–+———-+———-+——————+| test.t1 | repair | status | OK | set_1544429866_3 || test.t1 | repair | status | OK | set_1544429718_1 |+———+——–+———-+———-+——————+2 rows in set (0.01 sec)
具体语法:
·sets:set_1,set_2:代表指定某几个 set,set 名字可以通过/*proxy*/show status查询。
·sets:allsets:代表指定全部 set。
·shardkey:10:代表支持透传 SQL 到 shardkey 对应值上的 set。
·shardkey_hash:10:透传到负责 hash 值为10的 set,如果为0,则发送到第一个 set 上。