sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

SQL query editor: MariaDB window function with alias gives bad linting errors

Open markus-ksg opened this issue 6 years ago • 0 comments

Describe the bug

A MariaDB window function used together with an alias results in bad linting errors in the SQL query editor.

To Reproduce

  1. Go to https://demo.phpmyadmin.net/master-config/index.php?route=/table/sql&db=opengis&table=world_borders&server=1
  2. Enter query:
SELECT *, COUNT(*) OVER(PARTITION BY `REGION`) AS 'count(REGION)' FROM `world_borders`

=> Linting errors:

phpmyadmin-linting-error

Expected behavior

No error. Query is correct and executes fine.

Server configuration

  • phpMyAdmin version: latest (5.1.0)

Client configuration

  • Browser: Firefox
  • Operating system: Windows 10

Additional context

The error only shows up if there is an AS 'label'.

markus-ksg avatar Jan 17 '20 14:01 markus-ksg