-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the current code temporary tables we identified and opened before other tables. CTE tables are identified in the same procedure as regular tables. When a temporary table and a CTE table have the same name T any reference to T that is in the scope of the CTE declaration must be associated with this CTE. Yet it was not done properly. When a reference to T was found in the scope of the declaration of CTE T a pointer to this CTE was set in the reference. No check that the reference had been already associated with a temporary table was done. As a result, if the temporary table T had been created then the reference to T was considered simultaneously as reference to the CTE named T and as a reference to the temporary table named T. This confused the code that were executed later and caused a crash of the server. Now when a table reference is associated with a CTE any previous association with a temporary table is dropped. This problem could be easily avoided if the temporary tables were not identified prematurely. as reference to CTE named T and
- Loading branch information
1 parent
d7d8c23
commit a287bfa
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters