fix: SQL Statement on QUERY_LOGGER prints none to log (#14358)
This commit is contained in:
parent
4ac90ddaee
commit
f55882e756
|
|
@ -232,6 +232,7 @@ def execute_sql_statement(
|
||||||
# Hook to allow environment-specific mutation (usually comments) to the SQL
|
# Hook to allow environment-specific mutation (usually comments) to the SQL
|
||||||
sql = SQL_QUERY_MUTATOR(sql, user_name, security_manager, database)
|
sql = SQL_QUERY_MUTATOR(sql, user_name, security_manager, database)
|
||||||
try:
|
try:
|
||||||
|
query.executed_sql = sql
|
||||||
if log_query:
|
if log_query:
|
||||||
log_query(
|
log_query(
|
||||||
query.database.sqlalchemy_uri,
|
query.database.sqlalchemy_uri,
|
||||||
|
|
@ -242,7 +243,6 @@ def execute_sql_statement(
|
||||||
security_manager,
|
security_manager,
|
||||||
log_params,
|
log_params,
|
||||||
)
|
)
|
||||||
query.executed_sql = sql
|
|
||||||
session.commit()
|
session.commit()
|
||||||
with stats_timing("sqllab.query.time_executing_query", stats_logger):
|
with stats_timing("sqllab.query.time_executing_query", stats_logger):
|
||||||
logger.debug("Query %d: Running query: %s", query.id, sql)
|
logger.debug("Query %d: Running query: %s", query.id, sql)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue