diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-03 17:02:14 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-03 17:02:14 +0300 |
commit | 664647d1f7c190f1cc54fb817b10c86f994c1fdc (patch) | |
tree | bbfafc773031daba5da578013d4bbd52be39e770 /sql/uniques.cc | |
parent | 2e0dc69895280f3b407e56dace32ad9cf25ce356 (diff) | |
download | mariadb-git-664647d1f7c190f1cc54fb817b10c86f994c1fdc.tar.gz |
Portability fixes.
Build-tools/Do-compile:
Don't delete distribution if not using --delete
Docs/manual.texi:
Added information about default values
mysql-test/t/rpl000017.test:
Fixed replication test to be more portable
mysys/mf_iocache2.c:
More comments
sql/item_sum.cc:
Cleanup
sql/log_event.cc:
Cleanup
sql/mysqld.cc:
Fixed typos in output
sql/sql_base.cc:
Cleanup
sql/sql_delete.cc:
Cleanup
sql/sql_select.cc:
Cleanup
sql/uniques.cc:
Portability fix
Diffstat (limited to 'sql/uniques.cc')
-rw-r--r-- | sql/uniques.cc | 27 |
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. |