hqbhoho opened a new issue, #7807:
URL: https://github.com/apache/gravitino/issues/7807

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   As #5721 mentioned, `autoIncrement`  column can not be null rather than 
`unique index` column.
   ```shell
   mysql> CREATE TABLE t3 (  c1 INT NULL , UNIQUE KEY (c1) );
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> show create table t3;
   
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
   | Table | Create Table                                                       
                                                                      |
   
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
   | t3    | CREATE TABLE `t3` (
     `c1` int DEFAULT NULL,
     UNIQUE KEY `c1` (`c1`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
   
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   
   mysql> CREATE TABLE t4 (  c1 INT NULL AUTO_INCREMENT, UNIQUE KEY (c1) );
   Query OK, 0 rows affected (0.01 sec)
   
   mysql> show create table t4;
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table | Create Table                                                       
                                                                                
 |
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
   | t4    | CREATE TABLE `t4` (
     `c1` int NOT NULL AUTO_INCREMENT,
     UNIQUE KEY `c1` (`c1`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.01 sec)
   
   
   ```
   
   ### Error message and/or stacktrace
   
   N/A
   
   ### How to reproduce
   
   N/A
   
   ### Additional context
   
   N/A


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