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
b395f9c2
Commit
b395f9c2
authored
Jun 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean
into mysql.com:/home/kgeorge/mysql/5.0/B18895
parents
dd247217
ac9a5303
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
mysql-test/r/select.result
mysql-test/r/select.result
+20
-0
mysql-test/t/select.test
mysql-test/t/select.test
+26
-0
sql/field.h
sql/field.h
+8
-1
No files found.
mysql-test/r/select.result
View file @
b395f9c2
...
...
@@ -3359,3 +3359,23 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
b bit not null,
c bit not null
);
create table t2 (
a int unsigned not null auto_increment primary key,
b bit not null,
c int unsigned not null,
d varchar(50)
);
insert into t1 (b,c) values (0,1), (0,1);
insert into t2 (b,c) values (0,1);
select t1.a, t1.b + 0, t1.c + 0, t2.a, t2.b + 0, t2.c, t2.d
from t1 left outer join t2 on t1.a = t2.c and t2.b <> 1
where t1.b <> 1 order by t1.a;
a t1.b + 0 t1.c + 0 a t2.b + 0 c d
1 0 1 1 0 1 NULL
2 0 1 NULL NULL NULL NULL
drop table t1,t2;
mysql-test/t/select.test
View file @
b395f9c2
...
...
@@ -2840,3 +2840,29 @@ EXPLAIN
SELECT
a
,
c
,
d
,
f
FROM
t1
,
t2
WHERE
a
=
c
AND
b
BETWEEN
4
AND
6
AND
a
>
0
;
DROP
TABLE
t1
,
t2
;
#
# Bug #18895: BIT values cause joins to fail
#
create
table
t1
(
a
int
unsigned
not
null
auto_increment
primary
key
,
b
bit
not
null
,
c
bit
not
null
);
create
table
t2
(
a
int
unsigned
not
null
auto_increment
primary
key
,
b
bit
not
null
,
c
int
unsigned
not
null
,
d
varchar
(
50
)
);
insert
into
t1
(
b
,
c
)
values
(
0
,
1
),
(
0
,
1
);
insert
into
t2
(
b
,
c
)
values
(
0
,
1
);
--
Row
1
should
succeed
.
Row
2
should
fail
.
Both
fail
.
select
t1
.
a
,
t1
.
b
+
0
,
t1
.
c
+
0
,
t2
.
a
,
t2
.
b
+
0
,
t2
.
c
,
t2
.
d
from
t1
left
outer
join
t2
on
t1
.
a
=
t2
.
c
and
t2
.
b
<>
1
where
t1
.
b
<>
1
order
by
t1
.
a
;
drop
table
t1
,
t2
;
sql/field.h
View file @
b395f9c2
...
...
@@ -124,7 +124,7 @@ class Field
static
bool
type_can_have_key_part
(
enum_field_types
);
static
enum_field_types
field_type_merge
(
enum_field_types
,
enum_field_types
);
static
Item_result
result_merge_type
(
enum_field_types
);
bool
eq
(
Field
*
field
)
virtual
bool
eq
(
Field
*
field
)
{
return
(
ptr
==
field
->
ptr
&&
null_ptr
==
field
->
null_ptr
&&
null_bit
==
field
->
null_bit
);
...
...
@@ -1358,6 +1358,13 @@ class Field_bit :public Field {
bit_ptr
=
bit_ptr_arg
;
bit_ofs
=
bit_ofs_arg
;
}
bool
eq
(
Field
*
field
)
{
return
(
Field
::
eq
(
field
)
&&
field
->
type
()
==
type
()
&&
bit_ptr
==
((
Field_bit
*
)
field
)
->
bit_ptr
&&
bit_ofs
==
((
Field_bit
*
)
field
)
->
bit_ofs
);
}
};
...
...
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