告警升级公告
mysql> create table test1 ( a int, b int, c char(20),primary key (a,b),unique key u_1(a,c) ) shardkey=a;Query OK, 0 rows affected (0.07 sec)
mysql> create table test1 ( a int, b int, c char(20),primary key (a,b),unique key u_1(a,c),unique key u_2(b,c) ) shardkey=a;;
u_2不包含 shardkey,无法创建表,会报如下错误:ERROR 1105 (HY000): A UNIQUE INDEX must include all columns in the table's partitioning function
mysql> create table global_table ( a int, b int key) shardkey=noshardkey_allset;Query OK, 0 rows affected (0.06 sec)
mysql> create table noshard_table ( a int, b int key);Query OK, 0 rows affected (0.02 sec)
文档反馈