lwtdev edited a comment on issue #7731:
URL: https://github.com/apache/shardingsphere/issues/7731#issuecomment-707007288
@tristaZero @jiang2015
In fact, using the same configuration not only DDL but other SQL examples
are also have problem:
```sql
ShardingProxy(4.1.1)No Sharding
deleteMultiTable[hasShardingKey:all]; Support:true; SQL: delete
customer, customer_email from customer , customer_email where customer.status
= 3 and customer.id = 3 and customer_email.id = 3;
ds_0|delete customer, customer_email from customer , customer_email where
customer.status = 3 and customer.id = 3 and customer_email.id = 3|
ShardingProxy(5.0.0.RC1)No Sharding
deleteMultiTable[hasShardingKey:all]; Support:false; SQL: delete
customer, customer_email from customer , customer_email where customer.status
= 3 and customer.id = 3 and customer_email.id = 3;
java.sql.SQLException: 2Unknown exception: [Cannot support Multiple-Table
for
'org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLDeleteStatement@6e5eca13'.]
ShardingProxy(4.1.1)No Sharding
updateMultiTable[hasShardingKey:all]; Support:true; SQL: update
customer, customer_email set customer.party_id = party_id + 1,
customer_email.status = cusotmer.status where customer.id = 3 and
customer_email.id = 3;
ds_0|update customer, customer_email set customer.party_id = party_id + 1,
customer_email.status = cusotmer.status where customer.id = 3 and
customer_email.id = 3|
ShardingProxy(5.0.0.RC1)No Sharding
updateMultiTable[hasShardingKey:all]; Support:false; SQL: update
customer, customer_email set customer.party_id = party_id + 1,
customer_email.status = cusotmer.status where customer.id = 3 and
customer_email.id = 3;
java.sql.SQLException: 2Unknown exception: [Cannot support Multiple-Table
for
'org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLUpdateStatement@4f8e14c4'.]
```
- **Table init sql**
```sql
use test;
DROP table if exists customer;
drop table if exists customer_email;
drop table if exists full_table;
-- @title:createTableCustomer
CREATE TABLE `customer` (
`id` bigint(20) NOT NULL COMMENT '主键ID',
`party_id` bigint(20) NOT NULL COMMENT '用户ID',
`status` smallint(6) DEFAULT NULL COMMENT '状态:1-有效,0-无效 待删除字段',
PRIMARY KEY (`id`),
KEY `party_id_index` (`party_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户表';
-- @title:createTableCustomerEmail
CREATE TABLE customer_email (
id bigint(20) NOT NULL COMMENT '主键ID',
party_id bigint(20) NOT NULL COMMENT '用户ID',
`status` smallint(6) DEFAULT NULL COMMENT '状态:1-有效,0-无效 待删除字段',
PRIMARY KEY (`id`),
KEY `party_id_index` (`party_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户邮箱表';
-- @title:createFullFieldTypeTable
create table IF NOT EXISTS full_table
(
id bigint(15) not null auto_increment primary key comment 'primary key',
name varchar(255) default 'tom' COLLATE utf8_bin comment 'name',
class_id bigint(15) references class(id) on delete cascade,
age int,
t_bl bool,
t_ti tinyint(1),
t_si smallint(2),
t_mi middleint(10),
t_it int(10),
t_bi bigint(20),
t_dec decimal(15,2),
t_ft float(5),
t_db double(10,2),
t_dt date,
t_te time,
t_de datetime,
t_ts timestamp,
t_yr year,
t_ch char(10),
t_vh varchar(255),
t_by binary(2),
t_vb varbinary(25),
t_tb tinyblob,
t_mb mediumblob,
t_bb blob,
t_lb longblob,
t_tt tinytext,
t_mt mediumtext,
t_tx text,
t_lt longtext,
t_em enum('a', 'b') character set utf8 collate utf8_bin,
t_st set('a', 'b'),
t_gy geometry,
t_pt point,
t_ls linestring,
t_pn polygon,
t_mp multipoint,
t_ml multilinestring,
t_mn multipolygon,
t_gn geometrycollection,
t_jn json,
index indx_name_and_class using hash (class_id, name(20) desc) ,
index idx_class_id using btree (class_id asc) ,
constraint unique key (age),
check (age > 0)
) engine InnoDB CHARACTER SET utf8 COLLATE utf8_bin
auto_increment = 100 checksum 1
compression = 'none'
delay_key_write = 0
max_rows = 1000
min_rows = 1
pack_keys = 0
password = 'abc'
STATS_AUTO_RECALC = 0
STATS_PERSISTENT = 1
STATS_SAMPLE_PAGES = 4
ROW_FORMAT=REDUNDANT
union (class);
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]