1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

simple optimzation

Portability fixes
This commit is contained in:
monty@mysql.com
2004-03-31 03:32:38 +03:00
parent fede76ddf2
commit ddafa2cc16
9 changed files with 27 additions and 20 deletions

View File

@@ -2293,14 +2293,14 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
DBUG_RETURN(-1);
#endif
Field **ptr=table->field,*field;
TABLE *natural_join_table;
TABLE *natural_join_table= 0;
thd->used_tables|=table->map;
if (table->outer_join ||
!tables->natural_join ||
tables->natural_join->table->outer_join)
natural_join_table= NULL;
else
if (!table->outer_join &&
tables->natural_join &&
!tables->natural_join->table->outer_join)
natural_join_table= tables->natural_join->table;
while ((field = *ptr++))
{
/* Skip duplicate field names if NATURAL JOIN is used */