New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related (FK) NULL value field editing bug #14425
Comments
|
@Jay04653 DataSET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `fks` (
`id` int(11) NOT NULL,
`idUser` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `fks` (`id`, `idUser`) VALUES
(1, NULL);
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Users';
INSERT INTO `users` (`id`, `name`) VALUES
(1, 'oo');
ALTER TABLE `fks`
ADD PRIMARY KEY (`id`),
ADD KEY `idUser` (`idUser`);
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD KEY `id` (`id`);
ALTER TABLE `fks`
ADD CONSTRAINT `fks_ibfk_1` FOREIGN KEY (`idUser`) REFERENCES `users` (`id`);
COMMIT;ReproduceTry to edit |
|
Hey @williamdes! Can you please discuss that when this "Null" checkbox should be checked in ideal case? I guess either it would depend on, we can insert null or not or on the current value in that particular cell. Right now it's working according to the value. I think I can solve this issue. I have already reproduced this on my local system. |
|
@akkywadhwa What if when it is checked the input is disabled ? Empty is empty (defaults: unchecked) and when NULL is checked the input is disabled. This is how I expect this to work :) Does it answer your question ? cc: @ibennetch |
|
@williamdes, Hey I fixed this issue shall I open PR against QA_4_8? |
|
@kartik1000 Yes, please, go ahead :) |
Signed-off-by: William Desportes <williamdes@wdes.fr>
Steps to reproduce
Expected behaviour
Value should save, I guess Null checkbox should be unmarked when I started to typing/pasting FK ID see screenshot

Actual behaviour
In this case editing will be cancelled and value will be NULL again
Server configuration
Operating system: GNU/Linux Ubuntu 16.04 and 18.04
Web server: Apache 2.4
Database: MariaDB 10.1.31 / MySQL 5.7.21
PHP version: 7.1 / 7.2
phpMyAdmin version: 4.8.1 / 4.8.2
Client configuration
Browser: Google Chrome
Operating system: GNU/Linux Ubuntu 18.04
The text was updated successfully, but these errors were encountered: