summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-02-17 01:14:51 +0200
committerunknown <bell@sanja.is.com.ua>2004-02-17 01:14:51 +0200
commit54d93c41530655ef0d50c2654c80fd12d13ea8d9 (patch)
treea619c58eaa61934c229e4af77c6ea8c60678beb5 /sql/sql_lex.cc
parente8b6456f25656d339bb4f2bb64272679fa4f42d1 (diff)
downloadmariadb-git-54d93c41530655ef0d50c2654c80fd12d13ea8d9.tar.gz
ulternative bugfix for BUG#2508 and fix for BUG#2809 - every table has its own TABLE structure
mysql-test/r/union.result: fix for union test becuase now not all fields in UNION allow NULLS fix of test test suite for BUG#2809 mysql-test/t/union.test: test suite for BUG#2809 sql/mysql_priv.h: removed unused parameter of setup_tables() sql/sql_base.cc: removed unused parameter of setup_tables() cleanup of unused code sql/sql_class.h: removed unused field sql/sql_help.cc: removed unused parameter of setup_tables() sql/sql_insert.cc: removed unused parameter of setup_tables() sql/sql_lex.cc: excluded duplicate tables finding for UNION sql/sql_load.cc: removed unused parameter of setup_tables() sql/sql_olap.cc: removed unused parameter of setup_tables() sql/sql_prepare.cc: removed unused parameter of setup_tables() sql/sql_select.cc: removed unused parameter of setup_tables() revert old BUG#2508 patch sql/sql_union.cc: revert old BUG#2508 patch removed unused code sql/sql_update.cc: removed unused parameter of setup_tables() sql/table.h: shared used only for multi-update for now
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc29
1 files changed, 9 insertions, 20 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 5ffe8c1c365..96a0a86c43d 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1376,28 +1376,17 @@ create_total_list_n_last_return(THD *thd_arg,
{
TABLE_LIST *cursor;
next_table= aux->next;
- for (cursor= **result_arg; cursor; cursor= cursor->next)
- if (!strcmp(cursor->db, aux->db) &&
- !strcmp(cursor->real_name, aux->real_name) &&
- !strcmp(cursor->alias, aux->alias))
- break;
- if (!cursor)
+ /* Add not used table to the total table list */
+ if (!(cursor= (TABLE_LIST *) thd->memdup((char*) aux,
+ sizeof(*aux))))
{
- /* Add not used table to the total table list */
- if (!(cursor= (TABLE_LIST *) thd->memdup((char*) aux,
- sizeof(*aux))))
- {
- send_error(thd,0);
- return 1;
- }
- *new_table_list= cursor;
- cursor->table_list= aux; //to be able mark this table as shared
- new_table_list= &cursor->next;
- *new_table_list= 0; // end result list
+ send_error(thd,0);
+ return 1;
}
- else
- // Mark that it's used twice
- cursor->table_list->shared= aux->shared= 1;
+ *new_table_list= cursor;
+ cursor->table_list= aux;
+ new_table_list= &cursor->next;
+ *new_table_list= 0; // end result list
aux->table_list= cursor;
}
}