Bug #115415 Wrong query error?
Submitted: 24 Jun 2024 10:55 Modified: 29 Jun 2024 17:20
Reporter: Pedro Ferreira Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.4.0, 8.0.37 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: LATERAL

[24 Jun 2024 10:55] Pedro Ferreira
Description:
Run these statements:

CREATE TABLE t0 (c0 int);
SELECT 1 FROM t0 tx JOIN LATERAL (SELECT (SELECT 1 FROM t0 JOIN LATERAL (SELECT tx.c0) x(x) ON TRUE), tx.c0 y, tx.c0 z) w(a, b, c) ON TRUE;
--ERROR 1052 (23000): Column 'tx.c0' in field list is ambiguous

The error seems to be wrong. There's a single tx.c0 column in the query and there's no ambiguity in usage.

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the statements above.
[24 Jun 2024 12:31] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.

regards,
Umesh
[29 Jun 2024 17:20] Roy Lyseng
Duplicate of bug#113887, fixed in 9.0.