ydastous opened a new issue, #34208:
URL: https://github.com/apache/superset/issues/34208

   ### Bug description
   
   Accessing a mysql db with MysqlConnector, we received `mysql error: No 
result set to fetch from` when we try to do an insert, create, update.
   
   The same statement work with the  mysqldb python module, but we need the 
caching_sha2_password  option,  i can not use it anymore in real life.
   
   ### Screenshots/recordings
   
   <img width="453" height="442" alt="Image" 
src="https://github.com/user-attachments/assets/c3bd36f9-95f8-46d4-9258-08f32fbaffed";
 />
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.11
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   superset_app          | 2025-07-17 
15:35:10,963:DEBUG:superset.sql_parse:Parsing with sqlparse statement: INSERT 
INTO yves_tst values ( 5 )
   superset_app          | 2025-07-17 15:35:10,970:DEBUG:root:Query 34414: 
Running query: INSERT INTO yves_tst values ( 5 )
   superset_app          | 2025-07-17 
15:35:10,971:DEBUG:superset.sql_parse:Parsing with sqlparse statement: INSERT 
INTO yves_tst values ( 5 )
   superset_app          | 2025-07-17 15:35:10,973:DEBUG:root:Query 34414: 
Handling cursor
   superset_app          | 2025-07-17 
15:35:10,973:DEBUG:superset.stats_logger:[stats_logger] (timing) 
sqllab.query.time_executing_query | 5.1240234375
   superset_app          | 2025-07-17 15:35:10,974:DEBUG:superset.sql_lab:Query 
34414: Fetching data for query object: {'changed_on': 
'2025-07-17T15:35:10.965779', 'dbId': 65, 'db': 'MySQL', 'endDttm': None, 
'errorMessage': None, 'executedSql': 'INSERT INTO yves_tst values ( 5 )', 'id': 
'WxvM8Ntcx5A', 'queryId': 34414, 'limit': 1000, 'limitingFactor': 
<LimitingFactor.DROPDOWN: 'DROPDOWN'>, 'progress': 0, 'rows': None, 'catalog': 
None, 'schema': 'duproprio', 'ctas': False, 'serverId': 34414, 'sql': 'INSERT 
INTO yves_tst values ( 5 )', 'sqlEditorId': '785', 'startDttm': 
Decimal('1752766510674.381000'), 'state': 'running', 'tab': 'Untitled Query 1', 
'tempSchema': None, 'tempTable': None, 'userId': 2, 'user': "Yves D'Astous", 
'resultsKey': None, 'trackingUrl': None, 'extra': {'cancel_query': 788986, 
'progress': 'Running statement 1 out of 1'}}
   superset_app          | 2025-07-17 
15:35:10,974:DEBUG:superset.stats_logger:[stats_logger] (timing) 
sqllab.query.time_fetching_results | 1.27099609375
   superset_app          | 2025-07-17 15:35:10,975:DEBUG:superset.sql_lab:Query 
34414: No result set to fetch from
   superset_app          | 2025-07-17 
15:35:10,991:DEBUG:superset.stats_logger:[stats_logger] (incr) 
SqlLabRestApi.execute_sql_query.error
   superset_app          | 2025-07-17 
15:35:10,991:WARNING:superset.views.error_handling:SupersetErrorsException
   superset_app          | Traceback (most recent call last):
   superset_app          |   File 
"/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in 
full_dispatch_request
   superset_app          |     rv = self.dispatch_request()
   superset_app          |          ^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File 
"/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in 
dispatch_request
   superset_app          |     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   superset_app          |            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File 
"/usr/local/lib/python3.11/site-packages/flask_appbuilder/security/decorators.py",
 line 95, in wraps
   superset_app          |     return f(self, *args, **kwargs)
   superset_app          |            ^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/views/base_api.py", line 119, 
in wraps
   superset_app          |     duration, response = time_function(f, self, 
*args, **kwargs)
   superset_app          |                          
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/core.py", line 1364, in 
time_function
   superset_app          |     response = func(*args, **kwargs)
   superset_app          |                ^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/views/base_api.py", line 91, 
in wraps
   superset_app          |     return f(self, *args, **kwargs)
   superset_app          |            ^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/log.py", line 303, in 
wrapper
   superset_app          |     value = f(*args, **kwargs)
   superset_app          |             ^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/sqllab/api.py", line 409, in 
execute_sql_query
   superset_app          |     command_result: CommandResult = command.run()
   superset_app          |                                     ^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/decorators.py", line 
266, in wrapped
   superset_app          |     return on_error(ex)
   superset_app          |            ^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/decorators.py", line 
236, in on_error
   superset_app          |     raise ex
   superset_app          |   File "/app/superset/utils/decorators.py", line 
259, in wrapped
   superset_app          |     result = func(*args, **kwargs)
   superset_app          |              ^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/commands/sql_lab/execute.py", 
line 105, in run
   superset_app          |     status = self._run_sql_json_exec_from_scratch()
   superset_app          |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/commands/sql_lab/execute.py", 
line 158, in _run_sql_json_exec_from_scratch
   superset_app          |     return self._sql_json_executor.execute(
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to