Commit 9aae1afb authored by unknown's avatar unknown

Bug#18071 Result from MATCH() uses too many decimals

 - Use FORMAT as a workaround to only output the first 6 decimals of the value returned
from MATCH
 - This has been done before


mysql-test/r/fulltext.result:
  Use FORMAT to only output the first 6 decimals from MATCH
mysql-test/t/fulltext.test:
  Use FORMAT to only output the first 6 decimals from MATCH
parent 16c47ef4
......@@ -447,12 +447,12 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a));
INSERT INTO t1 VALUES('test'),('test1'),('test');
PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')";
PREPARE stmt from "SELECT a, FORMAT(MATCH(a) AGAINST('test1 test'),6) FROM t1 WHERE MATCH(a) AGAINST('test1 test')";
EXECUTE stmt;
a MATCH(a) AGAINST('test1 test')
test1 0.68526661396027
a FORMAT(MATCH(a) AGAINST('test1 test'),6)
test1 0.685267
EXECUTE stmt;
a MATCH(a) AGAINST('test1 test')
test1 0.68526661396027
a FORMAT(MATCH(a) AGAINST('test1 test'),6)
test1 0.685267
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
......@@ -371,7 +371,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a));
INSERT INTO t1 VALUES('test'),('test1'),('test');
PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')";
PREPARE stmt from "SELECT a, FORMAT(MATCH(a) AGAINST('test1 test'),6) FROM t1 WHERE MATCH(a) AGAINST('test1 test')";
EXECUTE stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment