Skip to content
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

setting "null" keep an "enum" value #14982

Closed
DoctorSubtilis opened this issue Feb 27, 2019 · 7 comments
Closed

setting "null" keep an "enum" value #14982

DoctorSubtilis opened this issue Feb 27, 2019 · 7 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@DoctorSubtilis
Copy link

DoctorSubtilis commented Feb 27, 2019

In my database (mariadb) I have a enum field with "yes" or "not" ("si" o "no").
If I do un insert new record, there is no problem, not setting that filed (remain NULL);
but if I copy from an existing record, I cannot set to NULL that field: if it is yes is remain yes, even I check the NULL checkpox.

phpmyadmin enum bug

I tried with Falkon, Firefox and Chrome: always the same.
I think this is a bug: isn't it?
Thank you

@williamdes
Copy link
Member

Reproduced on demo servers (root, no password)

Tests data

-- Create table
CREATE TABLE `test_enum_null` (
  `a` enum('a','b') COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Add data
INSERT INTO `test_enum_null` (`a`) VALUES
(NULL),
('a');

Copy a record and check NULL, will throw an error because the NULL option has an issue when copying record.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Feb 27, 2019
@bahl24
Copy link
Contributor

bahl24 commented Feb 27, 2019

@williamdes What do you mean by copy record?

@DoctorSubtilis
Copy link
Author

In Pma you can edit a record, or "copy", which is a very useful function: you keep data of another record and change what you want. E.g. I copy a record with the author and title of work, and change only the page and the quotation's content.

@bahl24
Copy link
Contributor

bahl24 commented Feb 28, 2019

@DoctorSubtilis Ok I got it, thanks. Let me try

@bahl24
Copy link
Contributor

bahl24 commented Mar 2, 2019

@DoctorSubtilis There is something I would like to add, bug is also in insert screen, initially as default val is null, it is selected. But when you let's say click on a but later change to null, a remains selected like when copying a record

@bahl24
Copy link
Contributor

bahl24 commented Mar 2, 2019

@williamdes @DoctorSubtilis After spending few hours on this, I was able to successfully solve the issue. Kindly check

@williamdes williamdes self-assigned this Apr 28, 2019
@williamdes williamdes added this to the 4.8.6 milestone Apr 28, 2019
williamdes added a commit that referenced this issue Apr 28, 2019
Fixes: #14982
Pull-request: #14994
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 28, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants