Below is the list of changes that have just been committed into a local
5.0 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1975 05/11/08 01:27:15 petr@stripped +2 -0
Merge mysql.com:/home/cps/mysql/trees/mysql-4.1
into mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
support-files/mysql.spec.sh
1.126 05/11/08 01:27:10 petr@stripped +0 -0
SCCS merged
sql/examples/ha_tina.cc
1.21 05/11/08 01:12:32 petr@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: petr
# Host: owlet.
# Root: /home/cps/mysql/trees/mysql-5.0-virgin/RESYNC
--- 1.125/support-files/mysql.spec.sh 2005-10-28 18:50:20 +04:00
+++ 1.126/support-files/mysql.spec.sh 2005-11-08 01:27:10 +03:00
@@ -259,6 +259,7 @@
--includedir=%{_includedir} \
--mandir=%{_mandir} \
--enable-thread-safe-client \
+ --with-zlib-dir=bundled \
--with-readline ; \
# Add this for more debugging support
# --with-debug
--- 1.20/sql/examples/ha_tina.cc 2005-10-04 05:41:51 +04:00
+++ 1.21/sql/examples/ha_tina.cc 2005-11-08 01:12:32 +03:00
@@ -82,12 +82,16 @@
** TINA tables
*****************************************************************************/
-/*
- Used for sorting chains.
+/*
+ Used for sorting chains with qsort().
*/
int sort_set (tina_set *a, tina_set *b)
{
- return ( a->begin > b->begin ? 1 : ( a->begin < b->begin ? -1 : 0 )
);
+ /*
+ We assume that intervals do not intersect. So, it is enought to compare
+ any two points. Here we take start of intervals for comparison.
+ */
+ return ( a->begin > b->begin ? -1 : ( a->begin < b->begin ? 1 : 0 )
);
}
static byte* tina_get_key(TINA_SHARE *share,uint *length,
@@ -186,7 +190,8 @@
thr_lock_init(&share->lock);
pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST);
- if ((share->data_file= my_open(data_file_name, O_RDWR, MYF(0))) == -1)
+ if ((share->data_file= my_open(data_file_name, O_RDWR|O_APPEND,
+ MYF(0))) == -1)
goto error2;
/* We only use share->data_file for writing, so we scan to the end to append */
@@ -797,13 +802,8 @@
qsort(chain, (size_t)(chain_ptr - chain), sizeof(tina_set), (qsort_cmp)sort_set);
for (ptr= chain; ptr < chain_ptr; ptr++)
{
- /* We peek a head to see if this is the last chain */
- if (ptr+1 == chain_ptr)
- memmove(share->mapped_file + ptr->begin, share->mapped_file +
ptr->end,
- length - (size_t)ptr->end);
- else
- memmove((caddr_t)share->mapped_file + ptr->begin,
(caddr_t)share->mapped_file + ptr->end,
- (size_t)((ptr++)->begin - ptr->end));
+ memmove(share->mapped_file + ptr->begin, share->mapped_file + ptr->end,
+ length - (size_t)ptr->end);
length= length - (size_t)(ptr->end - ptr->begin);
}
| Thread |
|---|
| • bk commit into 5.0 tree (petr:1.1975) | Petr Chardin | 7 Nov |