1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

manual merge

sql/field.cc:
  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/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
This commit is contained in:
unknown
2005-07-04 03:50:04 +03:00
25 changed files with 458 additions and 333 deletions

View File

@ -58,13 +58,13 @@ static void make_unique_view_field_name(Item *target,
char *name= (target->orig_name ?
target->orig_name :
target->name);
uint name_len;
uint attempt= 0;
uint name_len, attempt;
char buff[NAME_LEN+1];
for (;; attempt++)
List_iterator_fast<Item> itc(item_list);
for (attempt= 0;; attempt++)
{
Item *check;
List_iterator_fast<Item> itc(item_list);
bool ok= TRUE;
if (attempt)
@ -84,6 +84,7 @@ static void make_unique_view_field_name(Item *target,
} while (check != last_element);
if (ok)
break;
itc.rewind();
}
target->orig_name= target->name;
@ -305,13 +306,14 @@ bool mysql_create_view(THD *thd,
{
Item *item;
List_iterator_fast<Item> it(select_lex->item_list);
List_iterator_fast<Item> itc(select_lex->item_list);
while ((item= it++))
{
Item *check;
List_iterator_fast<Item> itc(select_lex->item_list);
/* treat underlying fields like set by user names */
if (item->real_item()->type() == Item::FIELD_ITEM)
item->is_autogenerated_name= FALSE;
itc.rewind();
while ((check= itc++) && check != item)
{
if (my_strcasecmp(system_charset_info, item->name, check->name) == 0)
@ -822,6 +824,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
old_lex->can_use_merged()) &&
!old_lex->can_not_use_merged())
{
List_iterator_fast<TABLE_LIST> ti(view_select->top_join_list);
/* lex should contain at least one table */
DBUG_ASSERT(view_tables != 0);
@ -865,13 +868,11 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
nested_join->join_list= view_select->top_join_list;
/* re-nest tables of VIEW */
ti.rewind();
while ((tbl= ti++))
{
List_iterator_fast<TABLE_LIST> ti(nested_join->join_list);
while ((tbl= ti++))
{
tbl->join_list= &nested_join->join_list;
tbl->embedding= table;
}
tbl->join_list= &nested_join->join_list;
tbl->embedding= table;
}
}