Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.1.2
-
None
-
Windows 10 22H2
Docker version 24.0.5, build ced0996
Docker Compose version v2.20.2-desktop.1
Docker-Compose-File: see Attachments
using MariaDB v. 11.1.2 with docker compose
Image information (uname -a):
Linux 23b7ba3f4fbc 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxWindows 10 22H2 Docker version 24.0.5, build ced0996 Docker Compose version v2.20.2-desktop.1 Docker-Compose-File: see Attachments using MariaDB v. 11.1.2 with docker compose Image information (uname -a): Linux 23b7ba3f4fbc 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Description
Hi everyone,
I am encountering the following problem:
I have a database which consists of three tables: users, abonnements, and user_abonnements. users and abonnements have unique IDs and user_abonnements is used to model the relation between users and abonnements (see attachment dump.sql). Until each abonnement should now have a starting date (validFrom) and an end date (validTo), I add two columns using the following queries to the table:
alter table user_abonnements |
add validFrom date not null; |
 |
alter table user_abonnements |
add validTo date null; |
This works just fine. As a user can also subscribe to the same abonnement multiple times (after the first subscription has ended), I want to add "validFrom" to the primary key such that the columns userID, abonnementID, and validFrom are considered as the primary key. However, when trying to drop the current primary key (userID, abonnementID) of the table, the MariaDB-Server crashes (see docker.log) while executing the following query:
alter table user_abonnements |
drop primary key; |
I think the server should return an error, stating that the primary key not be dropped because it is used for foreign keys instead of letting the server crash.
Attachments
Issue Links
- relates to
-
MDEV-32814 ALTER TABLE DROP PK crashes on WSL
- Open