Skip to content

Commit b5bd65b

Browse files
author
Evgeny Potemkin
committed
A local variable used only in assertion caused an 'unused variable' warning on a
non-debug build. The 'table' variable is removed from mysql_derived_materialize function.
1 parent 6c989d1 commit b5bd65b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sql/sql_derived.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,11 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
377377

378378
bool mysql_derived_materialize(THD *thd, LEX *lex, TABLE_LIST *derived)
379379
{
380-
TABLE *table= derived->table;
381380
SELECT_LEX_UNIT *unit= derived->get_unit();
382381
bool res= FALSE;
383382
DBUG_ENTER("mysql_derived_materialize");
384383

385-
DBUG_ASSERT(unit && table && table->created);
384+
DBUG_ASSERT(unit && derived->table && derived->table->created);
386385

387386
if (derived->materialized)
388387
DBUG_RETURN(FALSE);

0 commit comments

Comments
 (0)