Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Feature request - new option innodb_automatic_pk (default off, global/session)
During CREATE TABLE for InnoDB, automatically translate
-- FROM:
CREATE TABLE t1 (c2 INT) ENGINE=InnoDB;
|
-- TO:
CREATE TABLE t1 (_inv_PK SERIAL INVISIBLE PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
-- FROM:
ALTER TABLE t1 ADD PRIMARY KEY (`c2`);
|
-- TO:
ALTER TABLE t1 DROP COLUMN IF EXISTS _inv_PK, ADD PRIMARY KEY (`c2`);
|
It might be a good idea to modify or suppress warning "Can't DROP COLUMN `_inv_PK`" and to issue a warning that _inv_PK was created.
Attachments
Issue Links
- relates to
-
MDEV-28412 Introduce sql_require_primary_key
- Open
-
MDEV-10177 Invisible columns
- Closed
-
MDEV-19506 Remove the global sequence DICT_HDR_ROW_ID for DB_ROW_ID
- Closed
-
MDEV-24001 Implement hidden PK for RBR of no-unique key table
- Open
-
MDEV-24830 Write a warning to error log if Galera replicates InnoDB table with no primary key
- Closed
-
MDEV-25551 Assertion `mode_ == m_local || transaction_.is_streaming()` failed in BF abort
- Closed
-
MDEV-30430 Enabling system versioning on tables without primary key breaks replication
- Closed