Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.2063 06/03/10 13:12:39 msvensson@shellback.(none) +2 -0
Bug#18071 Result from MATCH() uses too many decimals
- Limit number of decimals returned from MATCH to FLT_DIG unless boolean mode, we leav it at NOT_FIXED_DEC, which meang we will use %g formatter, and no decimals will be used.
sql/item_func.h
1.136 06/03/10 13:12:29 msvensson@shellback.(none) +6 -0
Limit the number of decimals(unless in boolean mode) used when returning the match value to FLT_DIG,
which normally is "6".
mysql-test/r/fulltext.result
1.85 06/03/10 13:12:29 msvensson@shellback.(none) +3 -3
Update test result
Always only 6 decimals returned from MATCH unless in boolean mode
# 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: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/bug18071/my50-bug18071
--- 1.135/sql/item_func.h 2006-02-07 12:29:59 +01:00
+++ 1.136/sql/item_func.h 2006-03-10 13:12:29 +01:00
@@ -1301,6 +1301,12 @@
bool fix_index();
void init_search(bool no_order);
+ void fix_length_and_dec()
+ {
+ if (!(flags & FT_BOOL))
+ decimals= FLT_DIG;
+ max_length= float_length(decimals);
+ }
};
--- 1.84/mysql-test/r/fulltext.result 2006-02-07 12:25:55 +01:00
+++ 1.85/mysql-test/r/fulltext.result 2006-03-10 13:12:29 +01:00
@@ -407,7 +407,7 @@
INSERT INTO t1 VALUES ('testing ft_nlq_find_relevance');
SELECT MATCH(a) AGAINST ('nosuchword') FROM t1;
MATCH(a) AGAINST ('nosuchword')
-0
+0.000000
DROP TABLE t1;
create table t1 (a int primary key, b text, fulltext(b));
create table t2 (a int, b text);
@@ -450,9 +450,9 @@
PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')";
EXECUTE stmt;
a MATCH(a) AGAINST('test1 test')
-test1 0.68526661396027
+test1 0.685267
EXECUTE stmt;
a MATCH(a) AGAINST('test1 test')
-test1 0.68526661396027
+test1 0.685267
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2063) BUG#18071 | msvensson | 10 Mar |