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

Fix for issues with spatial fields #14125

Merged
merged 3 commits into from May 12, 2018

Conversation

Projects
None yet
2 participants
@nulll-pointer
Contributor

nulll-pointer commented Mar 26, 2018

Fixes the following issues:

  1. Fixes #14068 SPATIAL fields with no unique index/autoincrement error when clicking
    This error occurs when there is no unique column to uniquely identify a tuple. I've disabled the geomtery view and made view as wkt the default view in such cases.
  2. Fixes #14121 View spatial fields as WKT doesn't work
  3. Fixes #14067 IS NULL search operator produces no WHERE SQL with spatial fields
    Signed-Off-By: Lakshya arora arora.lakshya123@gmail.com

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests
@codecov

This comment has been minimized.

codecov bot commented Mar 28, 2018

Codecov Report

Merging #14125 into master will increase coverage by 2.54%.
The diff coverage is 10%.

@@             Coverage Diff              @@
##             master   #14125      +/-   ##
============================================
+ Coverage     52.89%   55.43%   +2.54%     
- Complexity    14351    14378      +27     
============================================
  Files           492      494       +2     
  Lines         63665    70621    +6956     
============================================
+ Hits          33676    39150    +5474     
- Misses        29989    31471    +1482
@nulll-pointer

This comment has been minimized.

Contributor

nulll-pointer commented Mar 29, 2018

How to add test cases to improve coverage??

@mauriciofauth

This comment has been minimized.

Member

mauriciofauth commented Mar 30, 2018

Hello, @nulll-pointer. Thanks for your contribution!
Each class has its own unit test class. These classes are found in the test/classes/ directory.
Run the vendor/bin/phpunit command to test.

Fix for issues with spatial fields
Fixes the following issues:

1.    #14068 SPATIAL fields with no unique index/autoincrement error when clicking
      This error occurs when there is no unique column to uniquely identify a tuple. I've disabled the geomtery view and made view as wkt the default view in such cases.

2.    #14121 View spatial fields as WKT doesn't work

1.    #14067 IS NULL search operator produces no WHERE SQL with spatial fields

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
@nulll-pointer

This comment has been minimized.

Contributor

nulll-pointer commented Apr 20, 2018

Hello @mauriciofauth, I've made some small changes in the unit test cases. Kindly have a look.

'hide_transformation' => $_SESSION['tmpval']['hide_transformation'],
'display_blob' => $_SESSION['tmpval']['display_blob'],
'display_binary' => $_SESSION['tmpval']['display_binary'],
'relational_display' => $_SESSION['tmpval']['relational_display'],
'displaywork' => $GLOBALS['cfgRelation']['displaywork'],
'relwork' => $GLOBALS['cfgRelation']['relwork'],
'possible_as_geometry' => $_SESSION['tmpval']['possible_as_geomtery'],

This comment has been minimized.

@mauriciofauth

mauriciofauth Apr 21, 2018

Member

This looks wrong. Are you sure it's correct?

Fix for issues with spatial fields
This commit fixes view as BINARY not working in the previous commit.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
@@ -1687,6 +1692,7 @@ private function _getOptionsBlock()
'relational_display' => $_SESSION['tmpval']['relational_display'],
'displaywork' => $GLOBALS['cfgRelation']['displaywork'],
'relwork' => $GLOBALS['cfgRelation']['relwork'],
'possible_as_geometry' => $_SESSION['tmpval']['possible_as_geomtery'],

This comment has been minimized.

@mauriciofauth

mauriciofauth Apr 21, 2018

Member

There's still a typo in possible_as_geomtery.

Fix for issues with spatial fields
Fixes typo in previous commits.

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

@mauriciofauth mauriciofauth merged commit 9231620 into phpmyadmin:master May 12, 2018

2 of 4 checks passed

DCO Expected "Lakshay arora <carefreelakshay97@gmail.com>", but got "Lakshay arora <arora.lakshya123@gmail.com>".
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Scrutinizer Analysis: 1 updated code elements – Tests: passed
Details

@mauriciofauth mauriciofauth self-assigned this May 12, 2018

@mauriciofauth

This comment has been minimized.

Member

mauriciofauth commented May 12, 2018

Merged, thanks for your contribution!

mauriciofauth added a commit that referenced this pull request May 12, 2018

Fix for issues with spatial fields (#14125)
*  Fix for issues with spatial fields

Fixes the following issues:

1.    #14068 SPATIAL fields with no unique index/autoincrement error when clicking
      This error occurs when there is no unique column to uniquely identify a tuple. I've disabled the geomtery view and made view as wkt the default view in such cases.

2.    #14121 View spatial fields as WKT doesn't work

1.    #14067 IS NULL search operator produces no WHERE SQL with spatial fields

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields
This commit fixes view as BINARY not working in the previous commit.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields

Fixes typo in previous commits.

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
(cherry picked from commit 9231620)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

mauriciofauth added a commit that referenced this pull request May 12, 2018

Add ChangeLog entry for #14125
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

@mauriciofauth mauriciofauth added this to the 4.8.1 milestone May 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment