mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
9914a0c847
Removed new error message Fixed test case for varbinary Threads are again killable in "merge_buffers" Cleanup of sql_repl.cc SHOW OPEN TABLES now works when no tables are opened Docs/manual.texi: Redefinition of myisam_bulk_insert_tree_size client/insert_test.c: Changed to use mysql_real_connect() include/mysql.h: Moved things in mysql_options to optimize these for 64 bit processors include/mysqld_error.h: Removed new error message myisam/mi_write.c: Use myisam_bulk_insert_tree_size per table instead of per index mysql-test/t/varbinary.test: Fixed test case for varbinary mysys/tree.c: Fixed missing if sql/filesort.cc: Threads are again killable in "merge_buffers" sql/log_event.h: cleanup sql/share/czech/errmsg.txt: Removed new error message sql/share/danish/errmsg.txt: Removed new error message sql/share/dutch/errmsg.txt: Removed new error message sql/share/english/errmsg.txt: Removed new error message sql/share/estonian/errmsg.txt: Removed new error message sql/share/french/errmsg.txt: Removed new error message sql/share/german/errmsg.txt: Removed new error message sql/share/greek/errmsg.txt: Removed new error message sql/share/hungarian/errmsg.txt: Removed new error message sql/share/italian/errmsg.txt: Removed new error message sql/share/japanese/errmsg.txt: Removed new error message sql/share/korean/errmsg.txt: Removed new error message sql/share/norwegian-ny/errmsg.txt: Removed new error message sql/share/norwegian/errmsg.txt: Removed new error message sql/share/polish/errmsg.txt: Removed new error message sql/share/portuguese/errmsg.txt: Removed new error message sql/share/romanian/errmsg.txt: Removed new error message sql/share/russian/errmsg.txt: Removed new error message sql/share/slovak/errmsg.txt: Removed new error message sql/share/spanish/errmsg.txt: Removed new error message sql/share/swedish/errmsg.txt: Removed new error message sql/sql_class.h: Cleanup sql/sql_delete.cc: Cleanup sql/sql_repl.cc: Cleanup sql/sql_show.cc: SHOW OPEN TABLES now works when no tables are opened sql/sql_sort.h: Threads are again killable in "merge_buffers" sql/uniques.cc: Threads are again killable in "merge_buffers"
55 lines
1.9 KiB
C
55 lines
1.9 KiB
C
/* Copyright (C) 2000 MySQL AB
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
/* Defines used by filesort and uniques */
|
|
|
|
#define MERGEBUFF 7
|
|
#define MERGEBUFF2 15
|
|
|
|
typedef struct st_buffpek { /* Struktur om sorteringsbuffrarna */
|
|
my_off_t file_pos; /* Where we are in the sort file */
|
|
uchar *base,*key; /* key pointers */
|
|
ha_rows count; /* Number of rows in table */
|
|
ulong mem_count; /* numbers of keys in memory */
|
|
ulong max_keys; /* Max keys in buffert */
|
|
} BUFFPEK;
|
|
|
|
|
|
typedef struct st_sort_param {
|
|
uint sort_length; /* Length of sort columns */
|
|
uint keys; /* Max keys / buffert */
|
|
uint ref_length; /* Length of record ref. */
|
|
ha_rows max_rows,examined_rows;
|
|
TABLE *sort_form; /* For quicker make_sortkey */
|
|
SORT_FIELD *local_sortorder;
|
|
SORT_FIELD *end;
|
|
uchar *unique_buff;
|
|
bool not_killable;
|
|
#ifdef USE_STRCOLL
|
|
char* tmp_buffer;
|
|
#endif
|
|
} SORTPARAM;
|
|
|
|
|
|
int merge_many_buff(SORTPARAM *param, uchar *sort_buffer,
|
|
BUFFPEK *buffpek,
|
|
uint *maxbuffer, IO_CACHE *t_file);
|
|
uint read_to_buffer(IO_CACHE *fromfile,BUFFPEK *buffpek,
|
|
uint sort_length);
|
|
int merge_buffers(SORTPARAM *param,IO_CACHE *from_file,
|
|
IO_CACHE *to_file, uchar *sort_buffer,
|
|
BUFFPEK *lastbuff,BUFFPEK *Fb,
|
|
BUFFPEK *Tb,int flag);
|