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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
652b7099
Commit
652b7099
authored
Feb 18, 2008
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-5.0-opt
into mysql.com:/home/hf/work/32942/my50-32942
parents
443c1a8b
7abba3b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/r/select.result
mysql-test/r/select.result
+21
-0
mysql-test/t/select.test
mysql-test/t/select.test
+18
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/select.result
View file @
652b7099
...
...
@@ -4334,4 +4334,25 @@ SELECT * FROM t1 WHERE a IN (CONCAT('foo', 0), 'bar');
a
foo0
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, c INT, KEY(a));
INSERT INTO t1 VALUES (1, 1), (2, 2);
INSERT INTO t2 VALUES (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5);
FLUSH STATUS;
SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3;
b
1
2
SHOW STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 2
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 6
DROP TABLE t1, t2;
End of 5.0 tests
mysql-test/t/select.test
View file @
652b7099
...
...
@@ -3683,4 +3683,22 @@ INSERT INTO t1 (a) VALUES ('foo0'), ('bar0'), ('baz0');
SELECT
*
FROM
t1
WHERE
a
IN
(
CONCAT
(
'foo'
,
0
),
'bar'
);
DROP
TABLE
t1
;
#
# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
);
CREATE
TABLE
t2
(
a
INT
,
c
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
2
);
INSERT
INTO
t2
VALUES
(
1
,
1
),
(
1
,
2
),
(
1
,
3
),
(
1
,
4
),
(
1
,
5
),
(
2
,
1
),
(
2
,
2
),
(
2
,
3
),
(
2
,
4
),
(
2
,
5
),
(
3
,
1
),
(
3
,
2
),
(
3
,
3
),
(
3
,
4
),
(
3
,
5
),
(
4
,
1
),
(
4
,
2
),
(
4
,
3
),
(
4
,
4
),
(
4
,
5
);
FLUSH
STATUS
;
SELECT
DISTINCT
b
FROM
t1
LEFT
JOIN
t2
USING
(
a
)
WHERE
c
<=
3
;
SHOW
STATUS
LIKE
'Handler_read%'
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
sql/sql_select.cc
View file @
652b7099
...
...
@@ -10796,7 +10796,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
we found a row, as no new rows can be added to the result.
*/
if
(
not_used_in_distinct
&&
found_records
!=
join
->
found_records
)
return
NESTED_LOOP_
OK
;
return
NESTED_LOOP_
NO_MORE_ROWS
;
}
else
join_tab
->
read_record
.
file
->
unlock_row
();
...
...
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