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
3fe9de28
Commit
3fe9de28
authored
Feb 09, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26017
parents
380c2205
951fe3ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+20
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+23
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-3
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+0
-1
No files found.
mysql-test/r/join_outer.result
View file @
3fe9de28
...
...
@@ -1194,3 +1194,23 @@ a b
3 3
4 NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (
f1 varchar(16) collate latin1_swedish_ci PRIMARY KEY,
f2 varchar(16) collate latin1_swedish_ci
);
CREATE TABLE t2 (
f1 varchar(16) collate latin1_swedish_ci PRIMARY KEY,
f3 varchar(16) collate latin1_swedish_ci
);
INSERT INTO t1 VALUES ('bla','blah');
INSERT INTO t2 VALUES ('bla','sheep');
SELECT * FROM t1 JOIN t2 USING(f1) WHERE f1='Bla';
f1 f2 f3
bla blah sheep
SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='bla';
f1 f2 f3
bla blah sheep
SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='Bla';
f1 f2 f3
bla blah sheep
DROP TABLE t1,t2;
mysql-test/t/join_outer.test
View file @
3fe9de28
...
...
@@ -802,3 +802,26 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.b WHERE (1=1 OR 2=2);
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
t1
.
a
=
t2
.
b
WHERE
(
1
=
1
OR
1
=
0
);
DROP
TABLE
t1
,
t2
;
#
# Bug 26017: LEFT OUTER JOIN over two constant tables and
# a case-insensitive comparison predicate field=const
#
CREATE
TABLE
t1
(
f1
varchar
(
16
)
collate
latin1_swedish_ci
PRIMARY
KEY
,
f2
varchar
(
16
)
collate
latin1_swedish_ci
);
CREATE
TABLE
t2
(
f1
varchar
(
16
)
collate
latin1_swedish_ci
PRIMARY
KEY
,
f3
varchar
(
16
)
collate
latin1_swedish_ci
);
INSERT
INTO
t1
VALUES
(
'bla'
,
'blah'
);
INSERT
INTO
t2
VALUES
(
'bla'
,
'sheep'
);
SELECT
*
FROM
t1
JOIN
t2
USING
(
f1
)
WHERE
f1
=
'Bla'
;
SELECT
*
FROM
t1
LEFT
JOIN
t2
USING
(
f1
)
WHERE
f1
=
'bla'
;
SELECT
*
FROM
t1
LEFT
JOIN
t2
USING
(
f1
)
WHERE
f1
=
'Bla'
;
DROP
TABLE
t1
,
t2
;
sql/item_cmpfunc.cc
View file @
3fe9de28
...
...
@@ -4034,11 +4034,9 @@ longlong Item_equal::val_int()
void
Item_equal
::
fix_length_and_dec
()
{
Item
*
item
=
const_item
?
const_item
:
get_first
();
Item
*
item
=
get_first
();
eval_item
=
cmp_item
::
get_comparator
(
item
->
result_type
(),
item
->
collation
.
collation
);
if
(
item
->
result_type
()
==
STRING_RESULT
)
eval_item
->
cmp_charset
=
cmp_collation
.
collation
;
}
bool
Item_equal
::
walk
(
Item_processor
processor
,
byte
*
arg
)
...
...
sql/item_cmpfunc.h
View file @
3fe9de28
...
...
@@ -1296,7 +1296,6 @@ class Item_equal: public Item_bool_func
Item
*
const_item
;
/* optional constant item equal to fields items */
cmp_item
*
eval_item
;
bool
cond_false
;
DTCollation
cmp_collation
;
public:
inline
Item_equal
()
:
Item_bool_func
(),
const_item
(
0
),
eval_item
(
0
),
cond_false
(
0
)
...
...
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