summaryrefslogtreecommitdiff
path: root/sql/uniques.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-10-03 17:02:14 +0300
committermonty@hundin.mysql.fi <>2001-10-03 17:02:14 +0300
commit55a6911bb158126302dd93467818fd2b32bcb78a (patch)
treebbfafc773031daba5da578013d4bbd52be39e770 /sql/uniques.cc
parent193ae61fc0ee63dfed758c8623f4ec331efd2374 (diff)
downloadmariadb-git-55a6911bb158126302dd93467818fd2b32bcb78a.tar.gz
Portability fixes.
Diffstat (limited to 'sql/uniques.cc')
-rw-r--r--sql/uniques.cc27
1 files changed, 13 insertions, 14 deletions
diff --git a/sql/uniques.cc b/sql/uniques.cc
index bd3ca6db0d0..fcee97dbb1a 100644
--- a/sql/uniques.cc
+++ b/sql/uniques.cc
@@ -35,6 +35,19 @@
#include "sql_sort.h"
+int unique_write_to_file(gptr key, element_count count, Unique *unique)
+{
+ return my_b_write(&unique->file, (byte*) key,
+ unique->tree.size_of_element) ? 1 : 0;
+}
+
+int unique_write_to_ptrs(gptr key, element_count count, Unique *unique)
+{
+ memcpy(unique->record_pointers, key, unique->tree.size_of_element);
+ unique->record_pointers+=unique->tree.size_of_element;
+ return 0;
+}
+
Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg,
uint size, ulong max_in_memory_size_arg)
:max_in_memory_size(max_in_memory_size_arg),elements(0)
@@ -73,20 +86,6 @@ bool Unique::flush()
}
-int unique_write_to_file(gptr key, element_count count, Unique *unique)
-{
- return my_b_write(&unique->file, (byte*) key,
- unique->tree.size_of_element) ? 1 : 0;
-}
-
-int unique_write_to_ptrs(gptr key, element_count count, Unique *unique)
-{
- memcpy(unique->record_pointers, key, unique->tree.size_of_element);
- unique->record_pointers+=unique->tree.size_of_element;
- return 0;
-}
-
-
/*
Modify the TABLE element so that when one calls init_records()
the rows will be read in priority order.