Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
When the following query:
SELECT table1 .`col_varchar_key`
FROM (
SELECT *
FROM BB ) table1 STRAIGHT_JOIN B ON ( 'd' , 'f' ) IN (
SELECT `col_varchar_nokey` SUBQUERY2_field1 , `col_varchar_nokey`
FROM view_B )
is executed with subquery cache by preparing it and running it twice, the server returns the following error:
1054: 'Unknown column 'materialized subselect.SUBQUERY2_field1' in 'order clause'
The main problem aside, it may not be wise to output optimizer-internal information in error messages. A generic "internal optimizer error" or a direct assertion may be less confusing than a message about a table or a column the user never created herself.