apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.83k stars 6.71k forks source link

AES encrypt bug #33026

Closed 15102552479 closed 2 days ago

15102552479 commented 2 days ago

AES encrypt bug:sharding-sphere5.5.0 1.table CREATE TABLE test ( id int(11) NOT NULL AUTO_INCREMENT, patient_id varchar(255) DEFAULT NULL, visit_sn varchar(255) DEFAULT NULL, visit_en varchar(255) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; //2. use sql: select * from (select ISNULL(GROUP_CONCAT(id)) as ids ,patient_id, visit_sn from test GROUP BY patient_id) a; //3.encrypt column visit_sn //4.Exception Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. java.sql.SQLException: Unsupported SQL operation: Can not support encrypt shorthand expand with subquery statement. at org.apache.shardingsphere.infra.exception.core.external.sql.ShardingSphereSQLException.toSQLException(ShardingSphereSQLException.java:76) at org.apache.shardingsphere.infra.exception.dialect.SQLExceptionTransformEngine.toSQLException(SQLExceptionTransformEngine.java:54) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:188) at org.apache.shardingsphere.driver.api.ShardingJDBCDemo.querycourse(ShardingJDBCDemo.java:167) at org.apache.shardingsphere.driver.api.ShardingJDBCDemo.main(ShardingJDBCDemo.java:135)

terrymanu commented 2 days ago

The version is out of service, please try new version.