Skip to content

planner: set_var(fix_control) is incompatible with binding #50507

@qw4990

Description

@qw4990

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(id int, a varchar(100), b int, c int, index idx_ab(a, b));

create global binding using select /*+ set_var(tidb_opt_fix_control='44389:on') */ * from t where c = 10 and (a = 'xx' or (a = 'kk' and b = 1));

2. What did you expect to see? (Required)

The binding can be created successfully.

3. What did you see instead (Required)

ERROR 1064 (42000): Optimizer hint syntax error at line 1 column 48 near ":on)*/" 

4. What is your TiDB version? (Required)

+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.0.0-alpha-42-g595fa7affc
Edition: Community
Git Commit Hash: 595fa7a
Git Branch: master
UTC Build Time: 2024-01-17 04:09:31
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions