diff options
author | unknown <monty@narttu.mysql.fi> | 2003-05-06 01:38:38 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-05-06 01:38:38 +0300 |
commit | b96aaea7e15642a8f0d9a478e9daabe470cb966d (patch) | |
tree | e4e5fa90d35bf2fc106cf0b773a29900579c7daa /sql/filesort.cc | |
parent | 03c1ec3d685b60d04b0db274c5201149322ac667 (diff) | |
download | mariadb-git-b96aaea7e15642a8f0d9a478e9daabe470cb966d.tar.gz |
Removed compiler warnings
Fixed memory leak in new filesort code
Optimzed sub selects to use keys with outer references.
Increased max tables in join to 62
client/Makefile.am:
Remve test programs
myisam/mi_check.c:
Remove compiler warnings
myisam/mi_delete.c:
Remove 'rnd' variable to make usage repeatable
myisam/mi_open.c:
Remove 'rnd' variable to make usage repeatable
myisam/mi_write.c:
Remove 'rnd' variable to make usage repeatable
myisam/myisamdef.h:
Remove 'rnd' variable to make usage repeatable
myisam/myisamlog.c:
Remove 'rnd' variable to make usage repeatable
mysql-test/r/subselect.result:
new test
mysql-test/t/join.test:
Updated test
mysql-test/t/subselect.test:
new test
sql/filesort.cc:
Added function to free buffers allocated by filesort
sql/item.cc:
Sub select optimization
sql/item_cmpfunc.cc:
Sub select optimization
sql/item_subselect.cc:
Sub select optimization
sql/item_sum.cc:
Removed compiler warnings
sql/item_sum.h:
Simple code cleanup
sql/log.cc:
Removed compiler warning
sql/mysql_priv.h:
Made table_map ulonglong to allow 62 tables in join
sql/records.cc:
Moved free of filesort buffers to own function
sql/sql_select.cc:
subselect optimization
Call filesort_free_buffers() to free memory from filesort
sql/unireg.h:
Sub select optimization
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index 928138b8d48..a3d24cd9242 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -262,6 +262,22 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, } /* filesort */ +void filesort_free_buffers(TABLE *table) +{ + if (table->sort.record_pointers) + { + my_free((gptr) table->sort.record_pointers,MYF(0)); + table->sort.record_pointers=0; + } + if (table->sort.addon_buf) + { + my_free((char *) table->sort.addon_buf, MYF(0)); + my_free((char *) table->sort.addon_field, MYF(MY_ALLOW_ZERO_PTR)); + table->sort.addon_buf=0; + table->sort.addon_field=0; + } +} + /* Make a array of string pointers */ static char **make_char_array(register uint fields, uint length, myf my_flag) |