You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/14 03:29:51 UTC

[GitHub] [shardingsphere] wsm12138 opened a new issue, #20964: alter view sharding_view rename to sharding_view_new; have error

wsm12138 opened a new issue, #20964:
URL: https://github.com/apache/shardingsphere/issues/20964

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   ```
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: f44e5d3c09a38139dbb2e1b0548816aa572ccc3c
   Commit Message: Release 5.2.0 and prepare for next development iteration (#20886)
   Branch: f44e5d3c09a38139dbb2e1b0548816aa572ccc3c
   Build time: 2022-09-13T10:25:52+0800
   ```
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   execute success
   ### Actual behavior
   ![uIF1INTUb2](https://user-images.githubusercontent.com/86462784/190052793-101d17d7-443d-42f6-b420-31f2e18a3c76.jpg)
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   1.start proxy
   ```
   databaseName: sharding_db
   #
   dataSources:
     ds_0:
       url: jdbc:opengauss://127.0.0.1:15432/demo_ds_0?batchMode=on
       username: gaussdb
       password: Secretpassword@123
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:opengauss://127.0.0.1:15432/demo_ds_1?batchMode=on
       username: gaussdb
       password: Secretpassword@123
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
     - !SHARDING
       tables:
         t_order:
           actualDataNodes: ds_${0..1}.t_order_${0..1}
           tableStrategy:
             standard:
               shardingColumn: order_id
               shardingAlgorithmName: t_order_inline
           keyGenerateStrategy:
             column: order_id
             keyGeneratorName: snowflake
         t_order_view:
           actualDataNodes: ds_${0..1}.t_order_view_${0..1}
           tableStrategy:
             standard:
               shardingColumn: order_id
               shardingAlgorithmName: t_order_view_inline
         t_order_view_new:
           actualDataNodes: ds_${0..1}.t_order_view_new_${0..1}
           tableStrategy:
             standard:
               shardingColumn: order_id
               shardingAlgorithmName: t_order_view_new_inline
         t_item:
           actualDataNodes: ds_${0..1}.t_item_${0..1}
           tableStrategy:
             standard:
               shardingColumn: id
               shardingAlgorithmName: t_item_inline
           keyGenerateStrategy:
             column: order_id
             keyGeneratorName: snowflake
       bindingTables:
         - t_order,t_order_view,t_order_view_new
       broadcastTables:
         - t_broadcast_table
         - t_broadcast_view
         - t_broadcast_view_new
       defaultDatabaseStrategy:
         standard:
           shardingColumn: user_id
           shardingAlgorithmName: database_inline
       defaultTableStrategy:
         none:
   
       shardingAlgorithms:
         database_inline:
           type: INLINE
           props:
             algorithm-expression: ds_${user_id % 2}
         t_order_inline:
           type: INLINE
           props:
             algorithm-expression: t_order_${order_id % 2}
         t_order_view_inline:
           type: INLINE
           props:
             algorithm-expression: t_order_view_${order_id % 2}
         t_order_view_new_inline:
           type: INLINE
           props:
             algorithm-expression: t_order_view_new_${order_id % 2}
         t_item_inline:
           type: INLINE
           props:
             algorithm-expression: t_item_${id % 2}
   
       keyGenerators:
         snowflake:
           type: SNOWFLAKE
   ```
   2. execute sql
   ```
   CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
   CREATE VIEW t_order_view as select order_id, status from t_order where order_id >= 1000;
   alter view t_order_view rename to t_order_view_new;
   ```
   ### Example codes for reproduce this issue (such as a github link).
   ![uIF1INTUb2](https://user-images.githubusercontent.com/86462784/190053141-98567c34-755b-4c95-b541-3339c9e9614f.jpg)
   
   ![LMDXhWK6P8](https://user-images.githubusercontent.com/86462784/190053117-bbd50b53-708f-41f8-b84b-74579d760164.jpg)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] tuichenchuxin closed issue #20964: alter view sharding_view rename to sharding_view_new; have error

Posted by GitBox <gi...@apache.org>.
tuichenchuxin closed issue #20964: alter view sharding_view rename to sharding_view_new; have error
URL: https://github.com/apache/shardingsphere/issues/20964


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org