dbTalk Databases Forums  

bk commit into 5.0 tree (serg:1.1843)

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss bk commit into 5.0 tree (serg:1.1843) in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sergei Golubchik
 
Posts: n/a

Default bk commit into 5.0 tree (serg:1.1843) - 03-31-2005 , 06:39 AM






Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg 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/in...urce-tree.html

ChangeSet
1.1843 05/03/31 13:46:46 serg (AT) serg (DOT) mylan +1 -0
correct short-circuting heuristics

strings/decimal.c
1.43 05/03/31 13:46:37 serg (AT) serg (DOT) mylan +3 -2
correct short-circuting heuristics

# 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: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-5.0

--- 1.42/strings/decimal.c Mon Mar 21 13:58:29 2005
+++ 1.43/strings/decimal.c Thu Mar 31 13:46:37 2005
@@ -1933,7 +1933,7 @@
XXX if this library is to be used with huge numbers of thousands of
digits, fast division must be implemented and alloca should be
changed to malloc (or at least fallback to malloc if alloca() fails)
- but then, decimal_mod() should be rewritten too
+ but then, decimal_mul() should be rewritten too
*/
static int do_div_mod(decimal_t *from1, decimal_t *from2,
decimal_t *to, decimal_t *mod, int scale_incr)
@@ -2062,7 +2062,7 @@
for ( ; buf0 < stop0; buf0++)
{
/* short-circuit, if possible */
- if (unlikely(*start1 == 0))
+ if (unlikely(start1[0] == 0 && start1[1] < start2[0]))
{
start1++;
if (likely(div))
@@ -2753,6 +2753,7 @@
test_dv("1.000000000000", "3","0.333333333333333333", 0);
test_dv("1", "1","1.000000000", 0);
test_dv("0.0123456789012345678912345", "9999999999","0.0000000000012345678902469135781481 41", 0);
+ test_dv("10.333000000", "12.34500","0.837019036046982584042122316", 0);

printf("==== decimal_mod ====\n");
test_md("234","10","4", 0);

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.