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

Error when executing query with WITH clause #13615

Closed
stevenwdv opened this Issue Aug 25, 2017 · 11 comments

Comments

Projects
None yet
2 participants
@stevenwdv
Contributor

stevenwdv commented Aug 25, 2017

Steps to reproduce

  • Choose a database
  • Go to the SQL tab
  • Type WITH a AS (SELECT * FROM mytable) SELECT * FROM a in the query field, where mytable is the name of a table in that database
  • Click Go
  • PMA executes the query (verified using general query log), but does not display the results and instead produces the following error:
Fatal error:
Uncaught Error: Call to a member function getClauses() on null in C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\vendor\phpmyadmin\sql-parser\src\Utils\Query.php:567
Stack trace:
#0 C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\vendor\phpmyadmin\sql-parser\src\Utils\Query.php(684): PhpMyAdmin\SqlParser\Utils\Query::getClause(NULL, NULL, 'ORDER BY', -1, false)
#1 C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\libraries\DisplayResults.php(1384): PhpMyAdmin\SqlParser\Utils\Query::replaceClause(NULL, NULL, 'ORDER BY', '')
#2 C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\libraries\DisplayResults.php(4375): PMA\libraries\DisplayResults->_getUnsortedSqlAndSortByKeyDropDown(Array, '')
#3 C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\libraries\sql.lib.php(1689): PMA\libraries\DisplayResults->getTable(Object(mysqli_result), Array, Array, false)
#4 C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\libraries\sql.lib.php(1980): PMA_getHtmlForSqlQueryResultsTable(Object(PMA\libraries\DisplayResults), './themes/pmahom...', NULL, Array, true, 21, 2 in C:\Users\Steven\.Programs\XAMPP\phpMyAdmin\vendor\phpmyadmin\sql-parser\src\Utils\Query.php on line 567

Server configuration

Operating system: Windows 10 x64

Web server: Apache 2.4.25 x64

Database: MariaDB 10.3.0 Alpha x64

PHP version: 7.1.6 x64

phpMyAdmin version: 4.7.4

Client configuration

Browser: Mozilla Firefox Developer Edition 56.0b5 x64

Operating system: Windows 10 x64

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35589

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35589

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35590

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35590

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35591

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.2
Incident count 1
Link Report#35591

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.0
Incident count 1
Link Report#35318

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.0
Incident count 1
Link Report#35318

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.0
Incident count 60
Link Report#34547

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.0
Incident count 60
Link Report#34547

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.6
Incident count 15
Link Report#34513

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.6
Incident count 15
Link Report#34513

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.1
Incident count 4
Link Report#33715

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.7.1
Incident count 4
Link Report#33715

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.2
Incident count 30
Link Report#30707

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.2
Incident count 30
Link Report#30707

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.2
Incident count 7
Link Report#30672

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.2
Incident count 7
Link Report#30672

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.4
Incident count 1
Link Report#29524

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.4
Incident count 1
Link Report#29524

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 4, 2017

Member
Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.1
Incident count 3
Link Report#29276

This comment is posted automatically by phpMyAdmin's error-reporting-server.

Member

nijel commented Sep 4, 2017

Param Value
Error Type Notice
Error Message Trying to get property of non-object
Exception Type php
phpMyAdmin version 4.6.5.1
Incident count 3
Link Report#29276

This comment is posted automatically by phpMyAdmin's error-reporting-server.

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