Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session vars of internal sql session not updated even user set global @sys_var #43488

Closed
guo-shaoge opened this issue Apr 28, 2023 · 2 comments
Closed
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@guo-shaoge
Copy link
Collaborator

guo-shaoge commented Apr 28, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Setup tidb cluster
  2. Run the following sqls:
create table t(c1 int);
insert into t values(1), (2), (3);
set global sql_mode = 'NO_BACKSLASH_ESCAPES';
  1. Restart tidb instance
  2. Run
analyze table t;  // will give error because sql_mode
set global sql_mode = '';
// reconnect tidb and run
analyze table t;

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

The last analyze should run ok.

3. What did you see instead (Required)

Still give parser error

4. What is your TiDB version? (Required)

+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                        |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.2.0-alpha-45-gda4bc2b905
Edition: Community
Git Commit Hash: da4bc2b9053b2842ce2bead531a0d4137286e75c
Git Branch: master
UTC Build Time: 2023-04-28 06:43:43
GoVersion: go1.20.1
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)
@guo-shaoge guo-shaoge added the type/bug The issue is confirmed as a bug. label Apr 28, 2023
@guo-shaoge
Copy link
Collaborator Author

Related parser error: #43392

@seiya-annie seiya-annie added the sig/sql-infra SIG: SQL Infra label May 8, 2023
@seiya-annie seiya-annie added affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. labels May 15, 2023
@bb7133
Copy link
Member

bb7133 commented Jul 27, 2023

Close this issue(fixed by #43966).

For the SQL mode used by internal SQLs, we need to make it consolidated(tracked in #45604)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants