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

SPATIAL fields with no unique index/autoincrement error when clicking #14068

Closed
ibennetch opened this issue Mar 9, 2018 · 1 comment
Closed

SPATIAL fields with no unique index/autoincrement error when clicking #14068

ibennetch opened this issue Mar 9, 2018 · 1 comment
Assignees
Milestone

Comments

@ibennetch
Copy link
Member

@ibennetch ibennetch commented Mar 9, 2018

I discovered this when looking at #14067; maybe it's related or a duplicate.

Steps to reproduce

  1. Start with a table containing no unique index (which will cause grid editing to fall back to our best effort to isolate the correct row):
CREATE TABLE `ptt` (
 `pt` POINT DEFAULT NULL
) ENGINE=InnoDB;

INSERT INTO `ptt` (`pt`) VALUES (NULL), (PointFromText('POINT(1 1)'));
  1. Browse the table and click the data, which should offer to download the row (or maybe let me edit it).

Expected behaviour

I should either be offered to download the data or grid edit.

Actual behaviour

An error is shown without any of the phpMyAdmin menu bar, navigation pane, etc:

Error

SQL query: DocumentationEdit Edit

SELECT `pt` FROM `ptt` WHERE ;

MySQL said: Documentation
MySQL returned an empty result set (i.e. zero rows).

Server configuration

Operating system:
Debian
Web server:
Apache
Database:
MariaDB 10.1.26
PHP version:
7.0.27
phpMyAdmin version:
master

Client configuration

Browser:
Firefox
Operating system:
MacOS

@aroralakshya
Copy link
Contributor

@aroralakshya aroralakshya commented Mar 21, 2018

Without any unique column, there can be no where clause for a particular tuple.

Also, the Well known text format in the options gives a bunch of errors and the values are empty.

@aroralakshya aroralakshya mentioned this issue Mar 26, 2018
3 of 4 tasks complete
mauriciofauth added a commit that referenced this issue May 12, 2018
*  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>
@mauriciofauth mauriciofauth self-assigned this May 12, 2018
mauriciofauth added a commit that referenced this issue May 12, 2018
*  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 mauriciofauth added this to the 4.8.1 milestone May 12, 2018
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.