sql_mode can be set in session, therefore we should look for ANSI_QUOTES in session variable instead of global variable (#677)

* issue-671: get ASNI_QUOTES from session sql_mode instead of GLOBAL sql_mode
This commit is contained in:
Soledad208 2024-11-07 15:56:31 +07:00 committed by GitHub
parent 90bd0b0a75
commit ebb37ae7a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 131 additions and 1 deletions

View file

@ -32,7 +32,7 @@ class InvalidPrivsError(Exception):
def get_mode(cursor):
cursor.execute('SELECT @@GLOBAL.sql_mode')
cursor.execute('SELECT @@sql_mode')
result = cursor.fetchone()
mode_str = result[0]
if 'ANSI' in mode_str: