Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.2
-
None
Description
If a QB_NAME hint is specified inside CREATE VIEW, subsequent SHOW CREATE VIEW does not display hints that follow QB_NAME.
create table t1 (a int); |
|
|
create view v1 as select /*+ qb_name(view1) no_bnl()*/ t1.* from t1, t1 as t2 |
where t1.a > t2.a; |
|
|
show create view v1; |
Output:
View Create View character_set_client collation_connection |
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select /*+ QB_NAME(`view1`) */ `t1`.`a` AS `a` from (`t1` join `t1` `t2`) where `t1`.`a` > `t2`.`a` latin1 latin1_swedish_ci |
Only QB_NAME() hint is displayed.
In contrast, if there is no QB_NAME hint inside view definition, all hints are displayed
create view v2 as select /*+ no_bnl() no_index(t1) */ t1.* from t1, t1 as t2 |
where t1.a > t2.a; |
|
|
show create view v2; |
Output:
View Create View character_set_client collation_connection |
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select /*+ NO_BNL() NO_INDEX(`t1`) */ `t1`.`a` AS `a` from (`t1` join `t1` `t2`) where `t1`.`a` > `t2`.`a` latin1 latin1_swedish_ci |
Attachments
Issue Links
- is caused by
-
MDEV-37511 New-style Optimizer Hints: milestones 3.1 and 3.2
-
- Closed
-