Commit 98fb8ea4 authored by monty@mysql.com's avatar monty@mysql.com

Merge with 3.23 to get patch for floor()

parents e27960a4 cba6ff75
...@@ -2112,8 +2112,8 @@ static my_bool mysql_reconnect(MYSQL *mysql) ...@@ -2112,8 +2112,8 @@ static my_bool mysql_reconnect(MYSQL *mysql)
{ {
/* Allow reconnect next time */ /* Allow reconnect next time */
mysql->server_status&= ~SERVER_STATUS_IN_TRANS; mysql->server_status&= ~SERVER_STATUS_IN_TRANS;
mysql->net.last_errno=CR_SERVER_GONE_ERROR; mysql->net.last_errno= CR_SERVER_GONE_ERROR;
strmov(mysql->net.last_error,ER(mysql->net.last_errno)); strmov(mysql->net.last_error, ER(mysql->net.last_errno));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
mysql_init(&tmp_mysql); mysql_init(&tmp_mysql);
......
...@@ -112,7 +112,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info) ...@@ -112,7 +112,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info)
/* Don't count this as a real warning, as check can correct this ! */ /* Don't count this as a real warning, as check can correct this ! */
uint save=param->warning_printed; uint save=param->warning_printed;
mi_check_print_warning(param, mi_check_print_warning(param,
"%d clients is using or hasn't closed the table properly", share->state.open_count==1 ?
"%d client is using or hasn't closed the table properly" :
"%d clients are using or haven't closed the table properly",
share->state.open_count); share->state.open_count);
/* If this will be fixed by the check, forget the warning */ /* If this will be fixed by the check, forget the warning */
if (param->testflag & T_UPDATE_STATE) if (param->testflag & T_UPDATE_STATE)
......
...@@ -59,3 +59,9 @@ ASIN(0.8+0.2) ...@@ -59,3 +59,9 @@ ASIN(0.8+0.2)
SELECT ASIN(1.2-0.2); SELECT ASIN(1.2-0.2);
ASIN(1.2-0.2) ASIN(1.2-0.2)
1.570796 1.570796
floor(log(4)/log(2))
2
floor(log(8)/log(2))
3
floor(log(16)/log(2))
4
...@@ -28,3 +28,11 @@ SELECT ACOS(0.2*5.0); ...@@ -28,3 +28,11 @@ SELECT ACOS(0.2*5.0);
SELECT ACOS(0.5*2.0); SELECT ACOS(0.5*2.0);
SELECT ASIN(0.8+0.2); SELECT ASIN(0.8+0.2);
SELECT ASIN(1.2-0.2); SELECT ASIN(1.2-0.2);
#
# Bug #3051 FLOOR returns invalid
#
select floor(log(4)/log(2));
select floor(log(8)/log(2));
select floor(log(16)/log(2));
...@@ -667,7 +667,8 @@ longlong Item_func_ceiling::val_int() ...@@ -667,7 +667,8 @@ longlong Item_func_ceiling::val_int()
longlong Item_func_floor::val_int() longlong Item_func_floor::val_int()
{ {
double value=args[0]->val(); // the volatile's for BUG #3051 to calm optimizer down (because of gcc's bug)
volatile double value=args[0]->val();
null_value=args[0]->null_value; null_value=args[0]->null_value;
return (longlong) floor(value); return (longlong) floor(value);
} }
......
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