logo       

bk commit into 4.1 tree (1.1520): msg#00371

db.mysql.devel

Subject: bk commit into 4.1 tree (1.1520)

Below is the list of changes that have just been committed into a local
4.1 repository of Sinisa. When Sinisa does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
1.1520 03/04/26 15:12:14 Sinisa@xxxxxxxxxxxxxxxxxxxx +6 -0
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_union.cc
1.74 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +2 -3
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_select.h
1.42 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +0 -39
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_select.cc
1.219 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +8 -20
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_lex.h
1.133 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +2 -2
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_derived.cc
1.43 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +1 -1
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

sql/sql_class.h
1.162 03/04/26 15:12:08 Sinisa@xxxxxxxxxxxxxxxxxxxx +42 -1
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Sinisa
# Host: sinisa.nasamreza.org
# Root: /mnt/work/mysql-4.1

--- 1.161/sql/sql_class.h Sun Apr 13 06:07:48 2003
+++ 1.162/sql/sql_class.h Sat Apr 26 15:12:08 2003
@@ -815,11 +815,52 @@
void abort();
};

+#include <myisam.h>
+
+/* Param to create temporary tables when doing SELECT:s */
+
+class TMP_TABLE_PARAM :public Sql_alloc
+{
+ public:
+ List<Item> copy_funcs;
+ List<Item> save_copy_funcs;
+ List_iterator_fast<Item> copy_funcs_it;
+ Copy_field *copy_field, *copy_field_end;
+ Copy_field *save_copy_field, *save_copy_field_end;
+ byte *group_buff;
+ Item **items_to_copy; /* Fields in tmp table */
+ MI_COLUMNDEF *recinfo,*start_recinfo;
+ KEY *keyinfo;
+ ha_rows end_write_records;
+ uint field_count,sum_func_count,func_count;
+ uint hidden_field_count;
+ uint group_parts,group_length,group_null_parts;
+ uint quick_group;
+ bool using_indirect_summary_function;
+
+ TMP_TABLE_PARAM()
+ :copy_funcs_it(copy_funcs), copy_field(0), group_parts(0),
+ group_length(0), group_null_parts(0)
+ {}
+ ~TMP_TABLE_PARAM()
+ {
+ cleanup();
+ }
+ inline void cleanup(void)
+ {
+ if (copy_field) /* Fix for Intel compiler */
+ {
+ delete [] copy_field;
+ copy_field=0;
+ }
+ }
+};
+
class select_union :public select_result {
public:
TABLE *table;
COPY_INFO info;
- TMP_TABLE_PARAM *tmp_table_param;
+ TMP_TABLE_PARAM tmp_table_param;
bool not_describe;

select_union(TABLE *table_par);

--- 1.132/sql/sql_lex.h Mon Apr 21 21:03:27 2003
+++ 1.133/sql/sql_lex.h Sat Apr 26 15:12:08 2003
@@ -397,7 +397,7 @@

friend void mysql_init_query(THD *thd);
st_select_lex(struct st_lex *lex);
- st_select_lex() {;}
+ st_select_lex() {}
void make_empty_select(st_select_lex *last_select)
{
select_number=INT_MAX;
@@ -480,7 +480,7 @@
CHARSET_INFO *charset;
char *help_arg;
SQL_LIST *gorder_list;
- st_lex() {;}
+ st_lex() {}
inline void uncacheable()
{
safe_to_cache_query= 0;

--- 1.218/sql/sql_select.cc Mon Apr 21 21:03:27 2003
+++ 1.219/sql/sql_select.cc Sat Apr 26 15:12:08 2003
@@ -1281,16 +1281,10 @@
JOIN_TAB *tab, *end;
for (tab= join_tab, end= tab+tables ; tab != end ; tab++)
{
- if (tab->select)
- {
- delete tab->select;
- tab->select=0;
- }
- if (tab->quick)
- {
- delete tab->quick;
- tab->quick=0;
- }
+ delete tab->select;
+ delete tab->quick;
+ tab->select=0;
+ tab->quick=0;
x_free(tab->cache.buff);
tab->cache.buff= 0;
}
@@ -3292,16 +3286,10 @@
{
for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++)
{
- if (tab->select)
- {
- delete tab->select;
- tab->select=0;
- }
- if (tab->quick)
- {
- delete tab->quick;
- tab->quick=0;
- }
+ delete tab->select;
+ delete tab->quick;
+ tab->select=0;
+ tab->quick=0;
x_free(tab->cache.buff);
tab->cache.buff= 0;
if (tab->table)

--- 1.41/sql/sql_select.h Fri Mar 14 21:25:46 2003
+++ 1.42/sql/sql_select.h Sat Apr 26 15:12:08 2003
@@ -113,45 +113,6 @@
} POSITION;


-/* Param to create temporary tables when doing SELECT:s */
-
-class TMP_TABLE_PARAM :public Sql_alloc
-{
- public:
- List<Item> copy_funcs;
- List<Item> save_copy_funcs;
- List_iterator_fast<Item> copy_funcs_it;
- Copy_field *copy_field, *copy_field_end;
- Copy_field *save_copy_field, *save_copy_field_end;
- byte *group_buff;
- Item **items_to_copy; /* Fields in tmp table */
- MI_COLUMNDEF *recinfo,*start_recinfo;
- KEY *keyinfo;
- ha_rows end_write_records;
- uint field_count,sum_func_count,func_count;
- uint hidden_field_count;
- uint group_parts,group_length,group_null_parts;
- uint quick_group;
- bool using_indirect_summary_function;
-
- TMP_TABLE_PARAM()
- :copy_funcs_it(copy_funcs), copy_field(0), group_parts(0),
- group_length(0), group_null_parts(0)
- {}
- ~TMP_TABLE_PARAM()
- {
- cleanup();
- }
- inline void cleanup(void)
- {
- if (copy_field) /* Fix for Intel compiler */
- {
- delete [] copy_field;
- copy_field=0;
- }
- }
-};
-
class JOIN :public Sql_alloc
{
public:

--- 1.42/sql/sql_derived.cc Thu Apr 10 21:05:21 2003
+++ 1.43/sql/sql_derived.cc Sat Apr 26 15:12:08 2003
@@ -151,7 +151,7 @@

if ((derived_result=new select_union(table)))
{
- derived_result->tmp_table_param=&tmp_table_param;
+ derived_result->tmp_table_param=tmp_table_param;
unit->offset_limit_cnt= select_cursor->offset_limit;
unit->select_limit_cnt= select_cursor->select_limit+
select_cursor->offset_limit;

--- 1.73/sql/sql_union.cc Mon Apr 21 21:03:27 2003
+++ 1.74/sql/sql_union.cc Sat Apr 26 15:12:08 2003
@@ -82,7 +82,7 @@
if (thd->net.last_errno == ER_RECORD_FILE_FULL)
{
thd->clear_error(); // do not report user about table overflow
- if (create_myisam_from_heap(thd, table, tmp_table_param,
+ if (create_myisam_from_heap(thd, table, &tmp_table_param,
info.last_errno, 0))
return 1;
}
@@ -186,8 +186,7 @@
goto err;

union_result->not_describe=1;
- if (!(union_result->tmp_table_param=(TMP_TABLE_PARAM *)thd->memdup((char
*)&tmp_table_param, sizeof(TMP_TABLE_PARAM))))
- goto err;
+ union_result->tmp_table_param=tmp_table_param;

/*
The following piece of code is placed here solely for the purpose of

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise