summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-03-08 22:04:17 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-03-08 22:04:17 +0400
commit3d52be158467a4cfdb397ca0ad3a808ebdcf26ff (patch)
treea0686066351b8e7441c1b2937a6d675b4a2963fd /sql/mysql_priv.h
parentceefecb2112559e3289a6bb457ef739720f0f789 (diff)
parent012ae63522372a16e824b7a47f04533b9f43423f (diff)
downloadmariadb-git-3d52be158467a4cfdb397ca0ad3a808ebdcf26ff.tar.gz
Merge bk@192.168.21.1:mysql-5.1
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt mysql-test/r/order_by.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/sp.test: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged mysql-test/r/func_str.result: merging mysql-test/r/sp.result: merging mysql-test/r/view.result: merging mysql-test/t/func_str.test: merging mysql-test/t/view.test: merging
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index a1a7c20fc50..efcbdf968bf 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1188,9 +1188,29 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
table_map read_tables, COND *conds,
bool allow_null_cond, int *error);
extern Item **not_found_item;
+
+/*
+ This enumeration type is used only by the function find_item_in_list
+ to return the info on how an item has been resolved against a list
+ of possibly aliased items.
+ The item can be resolved:
+ - against an alias name of the list's element (RESOLVED_AGAINST_ALIAS)
+ - against non-aliased field name of the list (RESOLVED_WITH_NO_ALIAS)
+ - against an aliased field name of the list (RESOLVED_BEHIND_ALIAS)
+ - ignoring the alias name in cases when SQL requires to ignore aliases
+ (e.g. when the resolved field reference contains a table name or
+ when the resolved item is an expression) (RESOLVED_IGNORING_ALIAS)
+*/
+enum enum_resolution_type {
+ NOT_RESOLVED=0,
+ RESOLVED_IGNORING_ALIAS,
+ RESOLVED_BEHIND_ALIAS,
+ RESOLVED_WITH_NO_ALIAS,
+ RESOLVED_AGAINST_ALIAS
+};
Item ** find_item_in_list(Item *item, List<Item> &items, uint *counter,
find_item_error_report_type report_error,
- bool *unaliased);
+ enum_resolution_type *resolution);
bool get_key_map_from_key_list(key_map *map, TABLE *table,
List<String> *index_list);
bool insert_fields(THD *thd, Name_resolution_context *context,
@@ -1248,7 +1268,8 @@ TABLE_LIST *find_table_in_list(TABLE_LIST *table,
st_table_list *TABLE_LIST::*link,
const char *db_name,
const char *table_name);
-TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list);
+TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
+ bool check_alias);
TABLE *find_temporary_table(THD *thd, const char *db, const char *table_name);
TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list);
bool close_temporary_table(THD *thd, TABLE_LIST *table_list);