1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Portability fixes.

Build-tools/Do-compile:
  Don't delete distribution if not using --delete
Docs/manual.texi:
  Added information about default values
mysql-test/t/rpl000017.test:
  Fixed replication test to be more portable
mysys/mf_iocache2.c:
  More comments
sql/item_sum.cc:
  Cleanup
sql/log_event.cc:
  Cleanup
sql/mysqld.cc:
  Fixed typos in output
sql/sql_base.cc:
  Cleanup
sql/sql_delete.cc:
  Cleanup
sql/sql_select.cc:
  Cleanup
sql/uniques.cc:
  Portability fix
This commit is contained in:
unknown
2001-10-03 17:02:14 +03:00
parent 2e0dc69895
commit 664647d1f7
11 changed files with 70 additions and 65 deletions

View File

@ -107,7 +107,6 @@ static uint find_shortest_key(TABLE *table, key_map usable_keys);
static bool test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,
ha_rows select_limit, bool no_changes);
static int create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit);
static bool fix_having(JOIN *join, Item **having);
static int remove_duplicates(JOIN *join,TABLE *entry,List<Item> &fields,
Item *having);
static int remove_dup_with_compare(THD *thd, TABLE *entry, Field **field,
@ -5443,39 +5442,6 @@ err:
DBUG_RETURN(-1);
}
/*
** Add the HAVING criteria to table->select
*/
static bool fix_having(JOIN *join, Item **having)
{
(*having)->update_used_tables(); // Some tables may have been const
JOIN_TAB *table=&join->join_tab[join->const_tables];
table_map used_tables= join->const_table_map | table->table->map;
Item* sort_table_cond=make_cond_for_table(*having,used_tables,used_tables);
if (sort_table_cond)
{
if (!table->select)
if (!(table->select=new SQL_SELECT))
return 1;
if (!table->select->cond)
table->select->cond=sort_table_cond;
else // This should never happen
if (!(table->select->cond=new Item_cond_and(table->select->cond,
sort_table_cond)))
return 1;
table->select_cond=table->select->cond;
DBUG_EXECUTE("where",print_where(table->select_cond,
"select and having"););
*having=make_cond_for_table(*having,~ (table_map) 0,~used_tables);
DBUG_EXECUTE("where",print_where(*having,"having after make_cond"););
}
return 0;
}
/*****************************************************************************
** Remove duplicates from tmp table
** This should be recoded to add a uniuqe index to the table and remove