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

Enum Or Set value save which contian & character #16977

Closed
armenmargaryan opened this issue Jun 22, 2021 · 3 comments
Closed

Enum Or Set value save which contian & character #16977

armenmargaryan opened this issue Jun 22, 2021 · 3 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@armenmargaryan
Copy link

Describe the bug

If enum or set field contain & character it is not possible to save such value from table linar editing.
i have tested this beaver on latest phpmyadmin version

To Reproduce

Steps to reproduce the behavior:

  1. create such table with enum or set field type and set value options to be test&test and test2&test
  2. insert few record to test table with values test&test
  3. open this table list page and double click on row enum field and try to choose second option test2&test you will see that instead your chosen test2&test there going to be saved test2& amp;test
  4. ERROR: after trying to save record you will get error or value will be not saved

Expected behavior

Values must be saved

Screenshots

Here is screenshot of save error

issue

Server configuration

  • Operating system: Windows, Linux
  • Web server: apache
  • Database version: tested on mysql 5.7,8.0
  • PHP version: 7.2,7.4
  • phpMyAdmin version: 5.1.0

Client configuration

  • Browser: Firefox and Crome
  • Operating system: Windows
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jun 22, 2021
@williamdes williamdes added this to the 5.1.2 milestone Jun 22, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jun 22, 2021
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jun 22, 2021
@williamdes williamdes self-assigned this Jun 23, 2021
@williamdes
Copy link
Member

Thank you for the report !
Confirmed with

START TRANSACTION;
INSERT INTO `enums` (`enum`, `set`, `ser`) VALUES
('', 'b&c', 1),
('', 'b&c', 2),
('a&b', 'a&b,b&c', 3);

ALTER TABLE `enums`
  ADD UNIQUE KEY `ser` (`ser`);

ALTER TABLE `enums`
  MODIFY `ser` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

williamdes added a commit that referenced this issue Jun 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jun 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jun 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jun 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jun 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Jun 23, 2021
@williamdes
Copy link
Member

Hi @armenmargaryan
I generated the snapshot, the fix is included in it: (phpMyAdmin 5.1+snapshot)

Let me know if it works fine

@armenmargaryan
Copy link
Author

Hi @williamdes ,
Yes i can confirm that with new build its resolved!
Thank you for so fast response and fix.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
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
issues
  
Closed
Development

No branches or pull requests

2 participants