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

Visualization GIS doesn't work #17188

Closed
erdnaaa opened this issue Nov 17, 2021 · 3 comments · Fixed by #17191
Closed

Visualization GIS doesn't work #17188

erdnaaa opened this issue Nov 17, 2021 · 3 comments · Fixed by #17191
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@erdnaaa
Copy link
Contributor

erdnaaa commented Nov 17, 2021

Describe the bug

i had a column that shows linestring and i can see the visualization of the data in browse tab, however if i run a query and click visualize data, it doesn't show anything

To Reproduce

Steps to reproduce the behavior:

  1. Create some linestring data
  2. Go to SQL tab
  3. run SELECT *
  4. Click Visualize GIS Data
  5. Nothing

Expected behavior

The line should be visible

Screenshots

This one works perfectly if i click the visualize button on browse tab
image

If i use query, it doesn't show
image
image

Server configuration

  • Operating system: Windows 10
  • Web server: xampp 3.3.0 (Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/8.0.12)
  • Database version: libmysql - mysqlnd 8.0.12
  • PHP version: 8.0.12
  • phpMyAdmin version: 5.1.1

Client configuration

  • Browser: Chrome Version 95.0.4638.69
  • Operating system: Windows 10
@MoonE
Copy link
Contributor

MoonE commented Nov 17, 2021

A query like

SELECT * FROM `geometries` WHERE label = '1';

is changed by the visualization to

SELECT ST_ASTEXT(`point`) AS `point`, ST_SRID(`point`) AS `srid` FROM (
  SELECT * FROM `geometries` WHERE label = '1';
) AS `temp_gis` LIMIT 0, 25

Notice the semicolon at the end of the original query is kept and causes a syntax error.

@MoonE
Copy link
Contributor

MoonE commented Nov 17, 2021

When clicking on the browse button to view a table the query is executed / displayed without a semicolon. When it is edited inline, a semicolon is automatically added.

Should a semicolon be added to the query when a table is browsed to be consistent?

$sqlQuery = 'SELECT * FROM ' . Util::backquote($table)
. $defaultOrderByClause;

The resulting sql error is silently ignored here

private function fetchRawData()
{
global $dbi;
$modified_result = $dbi->tryQuery($this->modifiedSql);
if ($modified_result === false) {
return [];
}

Would it be possible to show an error message instead?

@williamdes
Copy link
Member

Thank you for the report and fix @MoonE
Sorry for the response time

@williamdes williamdes added this to the 5.1.3 milestone Feb 7, 2022
@williamdes williamdes added Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete labels Feb 7, 2022
@williamdes williamdes linked a pull request Feb 7, 2022 that will close this issue
@ibennetch ibennetch modified the milestones: 5.1.3, 5.1.4 Feb 11, 2022
@williamdes williamdes self-assigned this Mar 5, 2022
williamdes added a commit that referenced this issue Mar 5, 2022
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Mar 5, 2022
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
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 has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants