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

sql_base.cc:

Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.
This commit is contained in:
igor@rurik.mysql.com
2005-08-12 01:27:04 -07:00
parent 0aff8a13dc
commit da441e949c
3 changed files with 32 additions and 2 deletions

View File

@ -3660,6 +3660,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
arena= 0; // For easier test
thd->set_query_id=1;
select_lex->cond_count= 0;
for (table= tables; table; table= table->next_local)
{
@ -3667,7 +3668,6 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
goto err_no_arena;
}
select_lex->cond_count= 0;
if (*conds)
{
thd->where="where clause";