diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-04 11:46:45 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-04 11:46:45 +0300 |
commit | 589762cff779afa99a5c0fb4e9c0dc21e493154c (patch) | |
tree | f0577c58f0635bb6dd887750a45091691f20c1db /sql/uniques.cc | |
parent | 6097e627b43b5486564a571e7e2cf28d2c3c834a (diff) | |
parent | 8d035c57f0c5c65ecf9652bd913b3d2f988c8f6e (diff) | |
download | mariadb-git-589762cff779afa99a5c0fb4e9c0dc21e493154c.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/loaddata.result:
Auto merged
mysql-test/t/loaddata.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/uniques.cc:
Auto merged
mysql-test/include/mix1.inc:
manual merge 5.0-opt -> 5.1-opt
mysql-test/r/innodb_mysql.result:
manual merge 5.0-opt -> 5.1-opt
sql/log.cc:
manual merge 5.0-opt -> 5.1-opt
Diffstat (limited to 'sql/uniques.cc')
-rw-r--r-- | sql/uniques.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/uniques.cc b/sql/uniques.cc index 7a05ceaddfc..0394eee9c6d 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -360,17 +360,12 @@ Unique::reset() } /* - The comparison function, passed to queue_init() in merge_walk() must + The comparison function, passed to queue_init() in merge_walk() and in + merge_buffers() when the latter is called from Uniques::get() must use comparison function of Uniques::tree, but compare members of struct BUFFPEK. */ -struct BUFFPEK_COMPARE_CONTEXT -{ - qsort_cmp2 key_compare; - void *key_compare_arg; -}; - C_MODE_START static int buffpek_compare(void *arg, uchar *key_ptr1, uchar *key_ptr2) @@ -629,6 +624,10 @@ bool Unique::get(TABLE *table) sort_param.unique_buff= sort_buffer+(sort_param.keys* sort_param.sort_length); + sort_param.compare= (qsort2_cmp) buffpek_compare; + sort_param.cmp_context.key_compare= tree.compare; + sort_param.cmp_context.key_compare_arg= tree.custom_arg; + /* Merge the buffers to one file, removing duplicates */ if (merge_many_buff(&sort_param,sort_buffer,file_ptr,&maxbuffer,&file)) goto err; |