1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed a valgrind problem.

The function setup_tables should handle table_list elements for
semijoin materialized tables in a special way when executing
a prepared statement for the second time.
This commit is contained in:
Igor Babaev
2011-06-23 22:12:22 -07:00
parent 3cf0d6f446
commit d6b0767c8c
2 changed files with 11 additions and 3 deletions

View File

@ -7830,9 +7830,16 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
select_lex->leaf_tables.empty();
while ((table_list= ti++))
{
table_list->table->tablenr= table_list->tablenr_exec;
table_list->table->map= table_list->map_exec;
table_list->table->pos_in_table_list= table_list;
if(table_list->jtbm_subselect)
{
table_list->jtbm_table_no= table_list->tablenr_exec;
}
else
{
table_list->table->tablenr= table_list->tablenr_exec;
table_list->table->map= table_list->map_exec;
table_list->table->pos_in_table_list= table_list;
}
select_lex->leaf_tables.push_back(table_list);
}
}