peilinqian commented on issue #21013:
URL: 
https://github.com/apache/shardingsphere/issues/21013#issuecomment-1260264157

   test_db=> create table t_broadcast(id int,c_id int,a int,b char(10));
   CREATE TABLE
   test_db=> insert into t_broadcast values 
(1,1,10,'test11'),(1,2,10,'Test12'),(1,2,null,'test12'),
   test_db-> (2,1,20,'test21'),(2,2,20,'test22'),(2,3,null,'Test22'),
   test_db-> (3,3,null,'test3'),(3,3,null,'test3'),(4,4,40,'test4'),(5,5,50,'');
   INSERT 0 10
   test_db=>
   test_db=> --创建视图;expect:成功
   test_db=> alter sharding broadcast table rules 
(t_broadcast,t_broadcast_view);
   SUCCESS
   test_db=> create view t_broadcast_view as select * from t_broadcast;
   CREATE VIEW
   test_db=> select * from t_broadcast_view where id=4;
    id | c_id | a  |     b
   ----+------+----+------------
     4 |    4 | 40 | test4
   (1 row)
   
   test_db=>
   test_db=> --增加修改改后名称的配置规则,改视图名称,修改后的名称配置广播规则;expect:成功
   test_db=> drop sharding broadcast table rules 
(t_broadcast,t_broadcast_view,t_broadcast_view_new);
   SUCCESS
   test_db=> create sharding broadcast table rules 
(t_broadcast,t_broadcast_view,t_broadcast_view_new);
   SUCCESS
   test_db=> select pg_sleep(2);
    pg_sleep
   ----------
   
   (1 row)
   
   test_db=> alter view t_broadcast_view rename to t_broadcast_view_new;
   ERROR:  String index out of range: -1
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to