|
drizzle
C++ MySQL-protocol-compatible database server
|
#include <name_resolution_context.h>
Public Member Functions | |
| void | init () |
| void | resolve_in_table_list_only (TableList *tables) |
Public Attributes | |
| Name_resolution_context * | outer_context |
| TableList * | table_list |
| TableList * | first_name_resolution_table |
| TableList * | last_name_resolution_table |
| Select_Lex * | select_lex |
| bool | resolve_in_select_list |
| SecurityContext * | security_ctx |
Additional Inherited Members | |
| Static Public Member Functions inherited from drizzled::memory::SqlAlloc | |
| static void * | operator new (size_t size) |
| static void * | operator new[] (size_t size) |
| static void * | operator new (size_t size, Root &root) |
| static void * | operator new[] (size_t size, Root &root) |
| static void * | operator new (size_t size, Root *root) |
| static void * | operator new[] (size_t size, Root *root) |
| static void | operator delete (void *) |
| static void | operator delete[] (void *) |
| static void | operator delete (void *, Root &) |
| static void | operator delete[] (void *, Root &) |
| static void | operator delete (void *, Root *) |
| static void | operator delete[] (void *, Root *) |
Instances of Name_resolution_context store the information necesary for name resolution of Items and other context analysis of a query made in fix_fields().
This structure is a part of Select_Lex, a pointer to this structure is assigned when an item is created (which happens mostly during parsing (sql_yacc.yy)), but the structure itself will be initialized after parsing is complete
Move subquery of INSERT ... SELECT and CREATE ... SELECT to separate Select_Lex which allow to remove tricks of changing this structure before and after INSERT/CREATE and its SELECT to make correct field name resolution.
Definition at line 43 of file name_resolution_context.h.
|
inline |
Definition at line 95 of file name_resolution_context.h.
|
inline |
Definition at line 104 of file name_resolution_context.h.
|
inline |
Definition at line 111 of file name_resolution_context.h.
| TableList* drizzled::Name_resolution_context::first_name_resolution_table |
In most cases the two table references below replace 'table_list' above for the purpose of name resolution. The first and last name resolution table references allow us to search only in a sub-tree of the nested join tree in a FROM clause. This is needed for NATURAL JOIN, JOIN ... USING and JOIN ... ON.
Definition at line 68 of file name_resolution_context.h.
| TableList* drizzled::Name_resolution_context::last_name_resolution_table |
Last table to search in the list of leaf table references that begins with first_name_resolution_table.
Definition at line 73 of file name_resolution_context.h.
| Name_resolution_context* drizzled::Name_resolution_context::outer_context |
The name resolution context to search in when an Item cannot be resolved in this context (the context of an outer select)
Definition at line 50 of file name_resolution_context.h.
| bool drizzled::Name_resolution_context::resolve_in_select_list |
When true items are resolved in this context both against the SELECT list and this->table_list. If false, items are resolved only against this->table_list.
Definition at line 87 of file name_resolution_context.h.
| SecurityContext* drizzled::Name_resolution_context::security_ctx |
Security context of this name resolution context. It's used for views and is non-zero only if the view is defined with SQL SECURITY DEFINER.
Definition at line 93 of file name_resolution_context.h.
| Select_Lex* drizzled::Name_resolution_context::select_lex |
Select_Lex item belong to, in case of merged VIEW it can differ from Select_Lex where item was created, so we can't use table_list/field_list from there
Definition at line 80 of file name_resolution_context.h.
| TableList* drizzled::Name_resolution_context::table_list |
List of tables used to resolve the items of this context. Usually these are tables from the FROM clause of SELECT statement. The exceptions are INSERT ... SELECT and CREATE ... SELECT statements, where SELECT subquery is not moved to a separate Select_Lex. For these types of statements we have to change this member dynamically to ensure correct name resolution of different parts of the statement.
Definition at line 60 of file name_resolution_context.h.