mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: remove HA_WANTS_PRIMARY_KEY as redundant
We don't have many bits left, no need to add another InnoDB-specific flag. Instead, we say that HA_REQUIRE_PRIMARY_KEY does not apply to SEQUENCE. Meaning, if the engine declares HA_CAN_TABLES_WITHOUT_ROLLBACK (required for SEQUENCE) it *must* support tables without a primary key.
This commit is contained in:
@@ -4133,10 +4133,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
key_info++;
|
||||
}
|
||||
|
||||
if (!unique_key && !primary_key &&
|
||||
((file->ha_table_flags() & HA_REQUIRE_PRIMARY_KEY) ||
|
||||
((file->ha_table_flags() & HA_WANTS_PRIMARY_KEY) &&
|
||||
!create_info->sequence)))
|
||||
if (!unique_key && !primary_key && !create_info->sequence &&
|
||||
(file->ha_table_flags() & HA_REQUIRE_PRIMARY_KEY))
|
||||
{
|
||||
my_message(ER_REQUIRES_PRIMARY_KEY, ER_THD(thd, ER_REQUIRES_PRIMARY_KEY),
|
||||
MYF(0));
|
||||
|
Reference in New Issue
Block a user