[MDEV-20063] Error description regression for derieved table missing alias (mariadb 10.4) Created: 2019-07-15  Updated: 2019-08-20  Resolved: 2019-08-20

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Subquery
Affects Version/s: 10.4.6
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Slawomir Pryczek Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Mariadb 10.4.6
Newest FC 30
5.1.15-300.fc30.x86_64 #1



 Description   

Hello Everyone, I have found some small regression in error reporting, basically it reports lack of derieved table's alias as syntax error in new version of maria. I think maybe some code was removed in 10.4 and that resulted in generic error being output instead of more descriptive one. Not sure if that's a bug, basically the older server was working better in this regard so reporting as minor bug and maybe it can be made to work the old way...

Code to reproduce it:

CREATE TEMPORARY TABLE `test_regr_99182` (
`x`  varchar(255) NULL );
SELECT count(*) FROM 
(SELECT * FROM test_regr_99182 limit 1) 

What new version (10.4.6) does:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 7

What old version (10.1) does:
[Err] 1248 - Every derived table must have its own alias



 Comments   
Comment by Sergei Golubchik [ 2019-08-20 ]

The new error is not wrong. The parser expects an identifier after the subquery in the FROM clause. But it doesn't get an identifier, this is a syntax error.

Generated at Thu Feb 08 08:56:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.