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
ca5e8aa8
Commit
ca5e8aa8
authored
Apr 13, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
parents
14e143e3
ff486287
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
configure.in
configure.in
+5
-0
mysql-test/r/func_op.result
mysql-test/r/func_op.result
+11
-0
mysql-test/t/func_op.test
mysql-test/t/func_op.test
+14
-0
sql/item_func.cc
sql/item_func.cc
+1
-4
No files found.
configure.in
View file @
ca5e8aa8
...
@@ -805,6 +805,9 @@ AC_SUBST(WRAPLIBS)
...
@@ -805,6 +805,9 @@ AC_SUBST(WRAPLIBS)
if
test
"
$TARGET_LINUX
"
=
"true"
;
then
if
test
"
$TARGET_LINUX
"
=
"true"
;
then
AC_MSG_CHECKING
([
for
atomic operations]
)
AC_MSG_CHECKING
([
for
atomic operations]
)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
atom_ops
=
atom_ops
=
AC_TRY_RUN
([
AC_TRY_RUN
([
#include <asm/atomic.h>
#include <asm/atomic.h>
...
@@ -840,6 +843,8 @@ int main()
...
@@ -840,6 +843,8 @@ int main()
if
test
-z
"
$atom_ops
"
;
then
atom_ops
=
"no"
;
fi
if
test
-z
"
$atom_ops
"
;
then
atom_ops
=
"no"
;
fi
AC_MSG_RESULT
(
$atom_ops
)
AC_MSG_RESULT
(
$atom_ops
)
AC_LANG_RESTORE
AC_ARG_WITH
(
pstack,
AC_ARG_WITH
(
pstack,
[
--with-pstack
Use the pstack backtrace library],
[
--with-pstack
Use the pstack backtrace library],
[
USE_PSTACK
=
$withval
]
,
[
USE_PSTACK
=
$withval
]
,
...
...
mysql-test/r/func_op.result
View file @
ca5e8aa8
...
@@ -35,3 +35,14 @@ select -1 >> 0, -1 << 0;
...
@@ -35,3 +35,14 @@ select -1 >> 0, -1 << 0;
select -1 >> 1, -1 << 1;
select -1 >> 1, -1 << 1;
-1 >> 1 -1 << 1
-1 >> 1 -1 << 1
9223372036854775807 18446744073709551614
9223372036854775807 18446744073709551614
drop table if exists t1,t2;
create table t1(a int);
create table t2(a int, b int);
insert into t1 values (1), (2), (3);
insert into t2 values (1, 7), (3, 7);
select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a;
a a b bit_count(t2.b)
1 1 7 3
2 NULL NULL NULL
3 3 7 3
drop table t1, t2;
mysql-test/t/func_op.test
View file @
ca5e8aa8
...
@@ -17,4 +17,18 @@ select 0 | -1, 0 ^ -1, 0 & -1;
...
@@ -17,4 +17,18 @@ select 0 | -1, 0 ^ -1, 0 & -1;
select
-
1
>>
0
,
-
1
<<
0
;
select
-
1
>>
0
,
-
1
<<
0
;
select
-
1
>>
1
,
-
1
<<
1
;
select
-
1
>>
1
,
-
1
<<
1
;
#
# Bug 13044: wrong bit_count() results
#
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
create
table
t1
(
a
int
);
create
table
t2
(
a
int
,
b
int
);
insert
into
t1
values
(
1
),
(
2
),
(
3
);
insert
into
t2
values
(
1
,
7
),
(
3
,
7
);
select
t1
.
a
,
t2
.
a
,
t2
.
b
,
bit_count
(
t2
.
b
)
from
t1
left
join
t2
on
t1
.
a
=
t2
.
a
;
drop
table
t1
,
t2
;
# End of 4.1 tests
# End of 4.1 tests
sql/item_func.cc
View file @
ca5e8aa8
...
@@ -2462,11 +2462,8 @@ longlong Item_func_bit_count::val_int()
...
@@ -2462,11 +2462,8 @@ longlong Item_func_bit_count::val_int()
{
{
DBUG_ASSERT
(
fixed
==
1
);
DBUG_ASSERT
(
fixed
==
1
);
ulonglong
value
=
(
ulonglong
)
args
[
0
]
->
val_int
();
ulonglong
value
=
(
ulonglong
)
args
[
0
]
->
val_int
();
if
(
args
[
0
]
->
null_value
)
if
((
null_value
=
args
[
0
]
->
null_value
))
{
null_value
=
1
;
/* purecov: inspected */
return
0
;
/* purecov: inspected */
return
0
;
/* purecov: inspected */
}
return
(
longlong
)
my_count_bits
(
value
);
return
(
longlong
)
my_count_bits
(
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