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

Binary foreign key enhancement #13894

Closed
williamdes opened this Issue Dec 27, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@williamdes
Copy link
Member

williamdes commented Dec 27, 2017

Steps to reproduce

  1. Select your favorite database
  2. Execute this script
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
CREATE TABLE `source` (
  `uuid` binary(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `source` (`uuid`) VALUES
(0x4b58cbea75a5b8e5cb2271da7226a5bc),
(0x5b58cbea76a5b8e5bb2271da7906a5bc);
CREATE TABLE `target` (
  `uuidTarget` binary(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `source`
  ADD PRIMARY KEY (`uuid`);
ALTER TABLE `target`
  ADD PRIMARY KEY (`uuidTarget`);
ALTER TABLE `target`
  ADD CONSTRAINT `target_source_fk` FOREIGN KEY (`uuidTarget`) REFERENCES `source` (`uuid`);
COMMIT;
  1. Tables > target > Insert

No display :
pma_bug_2

  1. Let's insert it manualy :
INSERT INTO `target`(`uuidTarget`) VALUES (0x5b58cbea76a5b8e5bb2271da7906a5bc);
  1. Tables > target > Browse
  2. Double click in the background of the column uuidTarget

Same issue :
pma_bug_3

Expected behaviour

The value should display like when browsing

pma_bug_4

Actual behaviour

No display of the foreign values
Using an option of the list will not insert the value, it will insert a null value because no value is sent to
tbl_replace.php

More informations

Same issue using foreign keys or internal relations
Same issue using VARBINARY

Server configuration

PHP version: 7.0.19-1
phpMyAdmin version: 4.7.7
Database: Server version: 10.2.10-MariaDB - Source distribution

Client configuration

Browser: 63.0.3239.108 (64 bits)

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Dec 27, 2017

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Dec 27, 2017

Update of dispRowForeignData, issue phpmyadmin#13894
Updated test

Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Dec 28, 2017

Partial patch for issue phpmyadmin#13894
Transformation of the output of a binary select to hex. 
Fixes 50% of the issue phpmyadmin#13894

Signed-off-by: William Desportes <williamdes@wdes.fr>

@williamdes williamdes referenced this issue Dec 28, 2017

Closed

. #13895

@williamdes

This comment has been minimized.

Copy link
Member Author

williamdes commented Mar 1, 2018

@ibennetch @nijel Can you add the tag : bug ?

@williamdes williamdes changed the title Binary foreign key insert Binary foreign key insert bug Mar 1, 2018

@ibennetch

This comment has been minimized.

Copy link
Member

ibennetch commented Mar 2, 2018

@williamdes I'm a little confused what relevance that is? If you'd like to submit a pull request you're welcome to regardless of the tags, and other developers will take a look when they have a chance even without the tag, so while the tags are useful I'm not sure what the importance is for you in this case. I haven't tested it myself to see which versions are affected, so I'm hesitant to add the bug tag myself at this time.

@williamdes

This comment has been minimized.

Copy link
Member Author

williamdes commented Apr 15, 2018

@ibennetch I am currently working on this issue.
I need this to be solved :)

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 15, 2018

Patch for binary foreign key insert/edit dropdown bug
Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 15, 2018

Patch for binary foreign key insert/edit dropdown bug
Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 15, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 15, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 19, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 19, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 19, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 22, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 22, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 22, 2018

Fixes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>
@mauriciofauth

This comment has been minimized.

Copy link
Member

mauriciofauth commented Apr 25, 2018

I added the enhancement tag because apparently this was never implemented. That is, it is not something that has stopped working.

@williamdes williamdes changed the title Binary foreign key insert bug Binary foreign key insert enhancement Apr 25, 2018

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Apr 26, 2018

Fixes: phpmyadmin#13894
Closes: phpmyadmin#13894

Signed-off-by: William Desportes <williamdes@wdes.fr>

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue May 2, 2018

Binary foreign key enhancement phpmyadmin#13894
Closes: phpmyadmin#13894
Signed-off-by: William Desportes <williamdes@wdes.fr>

@williamdes williamdes changed the title Binary foreign key insert enhancement Binary foreign key enhancement May 2, 2018

mauriciofauth added a commit that referenced this issue May 3, 2018

@mauriciofauth mauriciofauth self-assigned this May 3, 2018

@mauriciofauth mauriciofauth added this to the 5.0.0 milestone May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.