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

Fix for a bug record #307.

Very nasty bug.
It was caused by double free()-ing memory of join->select and 
join->quick. 

I was able to pinpoint it only after using Valgrind.

Plus better fix for bug with TMP_TABLE_PARAM.

Plus new constructor for SELECT_LEX.


mysql-test/r/innodb.result:
  Fix for a bug record #307.
  
  Very nasty bug.
  It was caused by double free()-ing memory of join->select and 
  join->quick. 
  
  I was able to pinpoint it only after using Valgrind.
mysql-test/t/innodb.test:
  Fix for a bug record #307.
  
  Very nasty bug.
  It was caused by double free()-ing memory of join->select and 
  join->quick. 
  
  I was able to pinpoint it only after using Valgrind.
sql/sql_lex.cc:
  Adding a usefull constructor
sql/sql_lex.h:
  Adding a usefull constructor which additionally required few more
  definitions.
sql/sql_select.cc:
  Fix for a bug record #307.
  
  Very nasty bug.
  It was caused by double free()-ing memory of join->select and 
  join->quick. 
  
  I was able to pinpoint it only after using Valgrind.
sql/sql_union.cc:
  Fixing bug #307.
  
  Also, a better fix for TMP_TABLE_PARAM bug.
  
  Also, use of the new constructor for SELECT_LEX.
This commit is contained in:
unknown
2003-04-21 21:03:32 +03:00
parent fa741bbc03
commit 8078280c76
6 changed files with 64 additions and 16 deletions

View File

@ -1365,6 +1365,17 @@ ulong st_select_lex::get_table_join_options()
return table_join_options;
}
st_select_lex::st_select_lex(struct st_lex *lex)
{
select_number= ++lex->thd->select_number;
init_query();
init_select();
include_neighbour(lex->current_select);
include_global((st_select_lex_node**)&lex->all_selects_list);
lex->current_select= this;
}
/*
There are st_select_lex::add_table_to_list &
st_select_lex::set_lock_for_tables in sql_parse.cc