Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
98fb8ea4
Commit
98fb8ea4
authored
Mar 12, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 3.23 to get patch for floor()
parents
e27960a4
cba6ff75
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
4 deletions
+21
-4
libmysql/libmysql.c
libmysql/libmysql.c
+2
-2
myisam/mi_check.c
myisam/mi_check.c
+3
-1
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+6
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+8
-0
sql/item_func.cc
sql/item_func.cc
+2
-1
No files found.
libmysql/libmysql.c
View file @
98fb8ea4
...
...
@@ -2112,8 +2112,8 @@ static my_bool mysql_reconnect(MYSQL *mysql)
{
/* Allow reconnect next time */
mysql
->
server_status
&=
~
SERVER_STATUS_IN_TRANS
;
mysql
->
net
.
last_errno
=
CR_SERVER_GONE_ERROR
;
strmov
(
mysql
->
net
.
last_error
,
ER
(
mysql
->
net
.
last_errno
));
mysql
->
net
.
last_errno
=
CR_SERVER_GONE_ERROR
;
strmov
(
mysql
->
net
.
last_error
,
ER
(
mysql
->
net
.
last_errno
));
DBUG_RETURN
(
1
);
}
mysql_init
(
&
tmp_mysql
);
...
...
myisam/mi_check.c
View file @
98fb8ea4
...
...
@@ -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 ! */
uint
save
=
param
->
warning_printed
;
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
);
/* If this will be fixed by the check, forget the warning */
if
(
param
->
testflag
&
T_UPDATE_STATE
)
...
...
mysql-test/r/func_math.result
View file @
98fb8ea4
...
...
@@ -59,3 +59,9 @@ ASIN(0.8+0.2)
SELECT ASIN(1.2-0.2);
ASIN(1.2-0.2)
1.570796
floor(log(4)/log(2))
2
floor(log(8)/log(2))
3
floor(log(16)/log(2))
4
mysql-test/t/func_math.test
View file @
98fb8ea4
...
...
@@ -28,3 +28,11 @@ SELECT ACOS(0.2*5.0);
SELECT
ACOS
(
0.5
*
2.0
);
SELECT
ASIN
(
0.8
+
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
));
sql/item_func.cc
View file @
98fb8ea4
...
...
@@ -667,7 +667,8 @@ longlong Item_func_ceiling::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
;
return
(
longlong
)
floor
(
value
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment