You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inserting new values in a table that has a foreign key reference the foreign key values are duplicate in the dropdown list with a space added between the 2 groupings.
To Reproduce
CREATE TABLE `table1` (
`tab1_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
INSERT INTO `table1` (`tab1_id`, `name`) VALUES
(1, 'entry 1'),
(2, 'entry 2');
ALTER TABLE `table1`
ADD PRIMARY KEY (`tab1_id`),
ADD UNIQUE KEY `table1_name` (`name`);
ALTER TABLE `table1`
MODIFY `tab1_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
CREATE TABLE `table2` (
`tab2_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
ALTER TABLE `table2`
ADD PRIMARY KEY (`tab2_id`),
ADD KEY `names` (`name`);
ALTER TABLE `table2`
MODIFY `tab2_id` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `table2`
ADD CONSTRAINT `names` FOREIGN KEY (`name`) REFERENCES `table1` (`name`) ON DELETE NO ACTION ON UPDATE NO ACTION;
Switch to table 2 and click on Insert. Select the pulldown next to the name field and you should see the 2 entries from table 1 in the list twice with a space between them as shown in the image below.
Expected behavior
Since there are only 2 entries in the name field of table 1 only 2 names should be shown in the dropdown list when inserting a value in table 2.
Server configuration
Operating system: Windows
Web server: Apache 2.4.38
Database version: MariaDB 10.3.11
PHP version: 7.3.2
phpMyAdmin version: 4.8.5
Client configuration
Browser: Chrome/Firefox
Operating system: Windows
The text was updated successfully, but these errors were encountered:
Problem
When inserting new values in a table that has a foreign key reference the foreign key values are duplicate in the dropdown list with a space added between the 2 groupings.
To Reproduce
Switch to table 2 and click on Insert. Select the pulldown next to the
name
field and you should see the 2 entries from table 1 in the list twice with a space between them as shown in the image below.Expected behavior
Since there are only 2 entries in the name field of table 1 only 2 names should be shown in the dropdown list when inserting a value in table 2.
Server configuration
Client configuration
The text was updated successfully, but these errors were encountered: