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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master 3bb9a429
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   all
   
   ### Expected behavior
   Create table successfully.
   
   ### Actual behavior
   ```java
   java.sql.SQLSyntaxErrorException: Specified key was too long; max key length 
is 3072 bytes
   ```
   
   ### Reason analyze (If you can)
   #27605 The generated encrypted column is too long, which leads to the 
inability to index.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   ```sql
   -- Logic SQL:
   CREATE TABLE t1 (
   id int NOT NULL auto_increment PRIMARY KEY,
   b int NOT NULL,
   c datetime NOT NULL,
   INDEX idx_b(b),
   INDEX idx_c(c)
   ) ENGINE=InnoDB
   -- Actual SQL:
   CREATE TABLE t1 (
   id int NOT NULL auto_increment PRIMARY KEY,
   b_cipher VARCHAR(4000),
   b_like VARCHAR(4000),
   b_order VARCHAR(4000),
   c_cipher VARCHAR(4000), c_like VARCHAR(4000), c_order VARCHAR(4000),
   INDEX idx_b(b_cipher),
   INDEX idx_c(c_cipher)
   ) ENGINE=InnoDB
   ```
   


-- 
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