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
ce9cc47a
Commit
ce9cc47a
authored
Mar 26, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL3527: 5.0 part:
enabled the optional FOR JOIN to all the three clauses : USE, FORCE and IGNORE
parent
a65bc60d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
mysql-test/r/select.result
mysql-test/r/select.result
+6
-0
mysql-test/t/select.test
mysql-test/t/select.test
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-8
No files found.
mysql-test/r/select.result
View file @
ce9cc47a
...
...
@@ -3636,6 +3636,12 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT 1 FROM t1 IGNORE INDEX FOR JOIN (a) WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
EXPLAIN SELECT 1 FROM t1 USE INDEX FOR JOIN (a) WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
EXPLAIN SELECT 1 FROM t1 FORCE INDEX FOR JOIN (a) WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
...
...
mysql-test/t/select.test
View file @
ce9cc47a
...
...
@@ -3111,6 +3111,8 @@ DROP TABLE t1,t2,t3;
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
);
EXPLAIN
SELECT
1
FROM
t1
WHERE
a
=
1
;
EXPLAIN
SELECT
1
FROM
t1
IGNORE
INDEX
FOR
JOIN
(
a
)
WHERE
a
=
1
;
EXPLAIN
SELECT
1
FROM
t1
USE
INDEX
FOR JOIN (a) WHERE a = 1
;
EXPLAIN
SELECT
1
FROM
t1
FORCE
INDEX
FOR
JOIN
(
a
)
WHERE
a
=
1
;
DROP
TABLE
t1
;
#
...
...
sql/sql_yacc.yy
View file @
ce9cc47a
...
...
@@ -1092,7 +1092,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
key_alg opt_btree_or_rtree
%type <string_list>
key_usage_list
key_usage_list_inner
using_list
key_usage_list using_list
%type <key_part>
key_part
...
...
@@ -5907,19 +5907,15 @@ opt_key_definition:
sel->use_index_ptr= &sel->use_index;
sel->table_join_options|= TL_OPTION_FORCE_INDEX;
}
| IGNORE_SYM key_
or_index opt_for_join key_usage_list_inner
| IGNORE_SYM key_
usage_list
{
SELECT_LEX *sel= Select;
sel->ignore_index= *$
4
;
sel->ignore_index= *$
2
;
sel->ignore_index_ptr= &sel->ignore_index;
};
key_usage_list:
key_or_index key_usage_list_inner
{ $$= $2; }
;
key_usage_list_inner:
key_or_index opt_for_join
{ Select->interval_list.empty(); }
'(' key_list_or_empty ')'
{ $$= &Select->interval_list; }
...
...
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