[MDEV-3641] LP:612530 - 'Unknown column' when re-executing a prepared query optimized with materialization Created: 2010-08-02 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
When the following query: SELECT table1 .`col_varchar_key` 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. |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2010-08-02 ] |
|
Re: 'Unknown column' when re-executing a prepared query optimized with subquery caching SET LOCAL optimizer_switch = 'partial_match_rowid_merge=off,partial_match_table_scan=off,semijoin=off'; CREATE TABLE `BB` ( CREATE VIEW view_B AS SELECT * FROM B; PREPARE st1 FROM " EXECUTE st1; DEALLOCATE PREPARE st1; |
| Comment by Philip Stoev (Inactive) [ 2010-08-02 ] |
|
Re: 'Unknown column' when re-executing a prepared query optimized with subquery caching id select_type table type possible_keys key key_len ref rows filtered Extra |
| Comment by Timour Katchaounov (Inactive) [ 2010-10-24 ] |
|
Re: 'Unknown column' when re-executing a prepared query optimized with materialization Therefore I will mark the bug as fixed. The test case for the bug |
| Comment by Timour Katchaounov (Inactive) [ 2010-11-23 ] |
|
Re: 'Unknown column' when re-executing a prepared query optimized with materialization PREPARE st1 FROM " |
| Comment by Timour Katchaounov (Inactive) [ 2010-11-23 ] |
|
Re: 'Unknown column' when re-executing a prepared query optimized with materialization I have not investigated exactly why the string "SUBQUERY2_field1" has Why this works in 5.3-mwl#89: |
| Comment by Rasmus Johansson (Inactive) [ 2010-11-23 ] |
|
Launchpad bug id: 612530 |