From 024328953d54431a0fe0dc1dee21d8b5d4dac21f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Jan 2004 22:47:26 -0400 Subject: Fixed Bug #2338 Trigonometric arithmetic problem by fixing optimizer bug with help of 'volatile' keyword mysql-test/r/func_math.result: added tests for BUG #2338 Trigonometric arithmetic problems mysql-test/t/func_math.test: added tests for BUG #2338 Trigonometric arithmetic problems sql/item_func.cc: added keyword volatile in Item_func_acos::val and Item_func_asin::val to calm optimizer down and to avoid it's bug --- mysql-test/t/func_math.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t/func_math.test') diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 5299897d0f0..42ba8c73f69 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -13,3 +13,14 @@ select pow(10,log10(10)),power(2,4); select rand(999999),rand(); select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); select degrees(pi()),radians(360); + +# +# Bug #2338 Trignometric arithmatic problems +# + +SELECT ACOS(1.0); +SELECT ASIN(1.0); +SELECT ACOS(0.2*5.0); +SELECT ACOS(0.5*2.0); +SELECT ASIN(0.8+0.2); +SELECT ASIN(1.2-0.2); -- cgit v1.2.1