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

uopdate sql_mode #986

Merged
merged 3 commits into from
Apr 2, 2024
Merged

uopdate sql_mode #986

merged 3 commits into from
Apr 2, 2024

Conversation

yangj1211
Copy link
Collaborator

What type of PR is this?

  • Enhancement
  • Displaying
  • Typo
  • Doc Request

Which issue(s) this PR fixes:

issue #985

What this PR does / why we need it:

Sorry, something went wrong.

@yangj1211
Copy link
Collaborator Author

存在bug:matrixorigin/matrixone#14968
导致目前无法在配置文件中设置sql_mode
@dengn need to review

mysql> select * from student group by nation;--在`ONLY_FULL_GROUP_BY`模式下不支持进行此操作
ERROR 1149 (HY000): SQL syntax error: column "student.id" must appear in the GROUP BY clause or be used in an aggregate function

mysql> SET global sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_TRANS_TAB
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global和session的使用这里的例子不太对的。按这里设置成global的话,当前session是不会生效的。要重连建立新session才能生效的。

@yangj1211
Copy link
Collaborator Author

@dengn need to review

Copy link
Collaborator

@dengn dengn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global的也要单独写个例子。特别需要注意的是,global设置完了之后当前的session并不会生效,要重连才能生效。

@dengn dengn merged commit 4b9f00e into matrixorigin:main Apr 2, 2024
1 check passed
@yangj1211 yangj1211 deleted the mode branch May 21, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants