strongduanmu opened a new issue, #32696:
URL: https://github.com/apache/shardingsphere/issues/32696
## Bug Report
### Which version of ShardingSphere did you use?
df0cd6208016894a94638856a54d92d9bf4325d5
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Execute `ALTER VIEW sharding_view AS SELECT o.* FROM t_order o INNER JOIN
t_order_item i ON o.order_id = i.order_id WHERE o.order_id = 1;` successfully.
### Actual behavior
```
mysql> ALTER VIEW sharding_view AS SELECT o.* FROM t_order o INNER JOIN
t_order_item i ON o.order_id = i.order_id WHERE o.order_id = 1;
ERROR 20030 (0A000): Can not support operation 'ALTER VIEW' with sharding
table 't_order'.
```
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
```yaml
databaseName: sharding_db
dataSources:
ds_0:
url:
jdbc:mysql://127.0.0.1:3306/demo_ds_0?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url:
jdbc:mysql://127.0.0.1:3306/demo_ds_1?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
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_item:
actualDataNodes: ds_${0..1}.t_order_item_${0..1}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: t_order_item_inline
keyGenerateStrategy:
column: order_item_id
keyGeneratorName: snowflake
sharding_view:
actualDataNodes: ds_${0..1}.sharding_view_${0..1}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: sharding_view_inline
keyGenerateStrategy:
column: order_item_id
keyGeneratorName: snowflake
bindingTables:
- t_order,t_order_item,sharding_view
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_item_inline:
type: INLINE
props:
algorithm-expression: t_order_item_${order_id % 2}
sharding_view_inline:
type: INLINE
props:
algorithm-expression: sharding_view_${order_id % 2}
keyGenerators:
snowflake:
type: SNOWFLAKE
- !BROADCAST
tables:
- t_address
```
### Example codes for reproduce this issue (such as a github link).
--
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]