Bug #116345 | Feature Request: Create GPIKs on existing tables | ||
---|---|---|---|
Submitted: | 12 Oct 2024 17:32 | Modified: | 14 Oct 2024 4:37 |
Reporter: | Mershad Irani | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S4 (Feature request) |
Version: | 9.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[12 Oct 2024 17:32]
Mershad Irani
[13 Oct 2024 4:46]
Mershad Irani
Workaround: ========== Clarifying the workaround, the invisible column still shows up in "show create table" even though show_gipk_in_create_table_and_information_schema=0 While you can simulate GPIKs using the below method, it is not a GPIK in a true sense because the invisible column still shows up in "show create table" mysql> set show_gipk_in_create_table_and_information_schema = 0 ; Query OK, 0 rows affected (0.00 sec) mysql> create table t1(col1 int); Query OK, 0 rows affected (0.03 sec) mysql> ALTER TABLE t1 -> ADD COLUMN my_row_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT INVISIBLE, -> ADD PRIMARY KEY (my_row_id); Query OK, 0 rows affected (0.06 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE t1 ALTER COLUMN my_row_id SET INVISIBLE; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> show create table t1 \G *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLE `t1` ( `col1` int DEFAULT NULL, `my_row_id` bigint unsigned NOT NULL AUTO_INCREMENT /*!80023 INVISIBLE */, PRIMARY KEY (`my_row_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci 1 row in set (0.00 sec)
[14 Oct 2024 4:37]
MySQL Verification Team
Hello Mershad, Thank you for the feature request. regards, Umesh