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 #14202

merged 1 commit into from May 3, 2018


Copy link

Patch for binary foreign key insert/edit dropdown bug
Fixes: #13894

@williamdes williamdes force-pushed the issue-13894-bin-fk-bug branch 3 times, most recently from 34c0087 to 49bd7af Compare April 15, 2018 18:10
Copy link

codecov bot commented Apr 15, 2018

Codecov Report

Merging #14202 into master will decrease coverage by <.01%.
The diff coverage is 18.75%.

@@             Coverage Diff              @@
##             master   #14202      +/-   ##
- Coverage     50.31%    50.3%   -0.01%     
- Complexity    14367    14373       +6     
  Files           502      502              
  Lines         66997    67013      +16     
+ Hits          33708    33711       +3     
- Misses        33289    33302      +13

@williamdes williamdes force-pushed the issue-13894-bin-fk-bug branch 4 times, most recently from e6742aa to 33154b1 Compare April 22, 2018 14:36
@@ -1199,7 +1200,7 @@ public function purgeHistory($username)
* @access protected
public function buildForeignDropdown(array $foreign, $data, $mode)
public function buildForeignDropdown($column, array $foreign, $data, $mode)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @williamdes. Thanks for your contribution.

I don't know if it's necessary to create this $column parameter.

Is it possible to do something like this?

if (($_SESSION['tmpval']['display_binary']
&& $meta->type === self::STRING_FIELD)
|| ($_SESSION['tmpval']['display_blob']
&& stristr($meta->type, self::BLOB_FIELD))
) {
// in this case, restart from the original $content
if (mb_check_encoding($content, 'utf-8')
&& !preg_match('/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\x9F]/u', $content)
) {
// show as text if it's valid utf-8
$result = htmlspecialchars($content);
} else {
$result = '0x' . bin2hex($content);
// skip 3rd param
) = $this->_getPartialText($result);

Closes: phpmyadmin#13894
Signed-off-by: William Desportes <>
@williamdes williamdes changed the title Patch for binary foreign key insert/edit dropdown bug #13894 Binary foreign key enhancement #13894 May 2, 2018
@MauricioFauth MauricioFauth merged commit 3bf396c into phpmyadmin:master May 3, 2018
Copy link

Merged, thanks for your contribution!

@MauricioFauth MauricioFauth self-assigned this May 3, 2018
@MauricioFauth MauricioFauth added this to the 5.0.0 milestone May 3, 2018
@williamdes williamdes deleted the issue-13894-bin-fk-bug branch May 3, 2018 18:52
@williamdes williamdes restored the issue-13894-bin-fk-bug branch May 9, 2018 20:19
Copy link
Member Author

williamdes commented May 9, 2018

Do I create (another another issue & PR) or (a commit to this PR) for adding the ability to search through hex data ?

Copy link

@williamdes You can open a new issue, as it's a new issue, even though they are related.

Copy link
Member Author

@MauricioFauth I will do that.
I added a commit to this branch to fix my error.

@williamdes williamdes mentioned this pull request May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants