summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-10-20 16:21:40 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-10-20 16:21:40 -0200
commit560ee2158d17212ecb2ec282ee15b1e1eb5f2092 (patch)
treed427278052923d3b649a03292a823b7468075b95 /sql/sql_union.cc
parent60f30f690956e8e9066b40bb9e08cdcc66debf06 (diff)
downloadmariadb-git-560ee2158d17212ecb2ec282ee15b1e1eb5f2092.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds. Most of it is silencing variables that are set but unused. This patch also introduces the MY_ASSERT_UNREACHABLE macro which helps the compiler to deduce that a certain piece of code is unreachable.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 948ba1d9d9c..70598fbfcd4 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -173,7 +173,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
SELECT_LEX *sl, *first_sl= first_select();
select_result *tmp_result;
bool is_union_select;
- TABLE *empty_table= 0;
DBUG_ENTER("st_select_lex_unit::prepare");
describe= test(additional_options & SELECT_DESCRIBE);
@@ -275,14 +274,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
types= first_sl->item_list;
else if (sl == first_sl)
{
- /*
- We need to create an empty table object. It is used
- to create tmp_table fields in Item_type_holder.
- The main reason of this is that we can't create
- field object without table.
- */
- DBUG_ASSERT(!empty_table);
- empty_table= (TABLE*) thd->calloc(sizeof(TABLE));
types.empty();
List_iterator_fast<Item> it(sl->item_list);
Item *item_tmp;