polardbx-sql icon indicating copy to clipboard operation
polardbx-sql copied to clipboard

auto模式数据库BROADCAST表创建失败

Open welyss opened this issue 2 years ago • 2 comments

mysql> show create database sbtest; +----------+----------------------------------------------+ | DATABASE | CREATE DATABASE | +----------+----------------------------------------------+ | sbtest | CREATE DATABASE sbtest /* MODE = 'auto' */ | +----------+----------------------------------------------+ 1 row in set (0.01 sec) `mysql> CREATE TABLE broadcast_tbl(` ` -> id bigint not null auto_increment,` ` -> bid int,` ` -> name varchar(30),` ` -> primary key(id)` ` -> ) BROADCAST;` `Query OK, 0 rows affected (0.86 sec)` mysql> show rule from broadcast_tbl; +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ | ID | TABLE_NAME | BROADCAST | DB_PARTITION_KEY | DB_PARTITION_POLICY | DB_PARTITION_COUNT | TB_PARTITION_KEY | TB_PARTITION_POLICY | TB_PARTITION_COUNT | +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ | 0 | broadcast_tbl | 0 | NULL | NULL | 1 | NULL | NULL | 1 | +----+---------------+-----------+------------------+---------------------+--------------------+------------------+---------------------+--------------------+ 1 row in set (0.00 sec) ``

welyss avatar Aug 03 '22 05:08 welyss

看起来,没有报错呢。show create table broadcast_tbl

hustfxj avatar Aug 05 '22 05:08 hustfxj

@hustfxj ,表建成功了,但是show rule from broadcast_tbl;里显示不是BROADCAST表

welyss avatar Aug 05 '22 05:08 welyss

@welyss 确认了下,在你测试的版本里头没有show rule 命令没有适配auto模式。我想这张表应该是创建成功,且是广播表的,还可以试一下show topology from broadcast_tbl

hustfxj avatar Aug 15 '22 06:08 hustfxj