Bug #121375 SQL editor hangs on "Starting editor session..." when server sql_mode includes ANSI_QUOTES
| Submitted: | 27 Sep 21:47 | Modified: | 30 Oct 15:28 |
|---|---|---|---|
| Reporter: | Eric Aizprúa | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Workbench: SQL Editor | Severity: | S2 (Serious) |
| Version: | 26.7.0 / 26.7.1 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any |
[28 Sep 20:48]
MySQL Admin
Posted by developer: Bug status updated to 'Documenting'
[30 Oct 15:28]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Workbench 26.10.0 release notes: If the server sql_mode system variable included ANSI_QUOTES, MySQL Workbench could connect to the server, but the SQL editor remained at “Starting editor session...” indefinitely.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Connecting to a MySQL 8.0 server (Azure Database for MySQL Flexible Server) whose sql_mode includes ANSI_QUOTES leaves the editor stuck on "Starting editor session..." indefinitely. The connection itself succeeds. Two defects are involved: 1. The GUI plugin runs a query that uses double quotes for string literals, which fails under ANSI_QUOTES: SELECT ROUTINE_NAME FROM information_schema.routines WHERE ROUTINE_SCHEMA="sys" AND ROUTINE_NAME="mle_explain_error" AND ROUTINE_TYPE="PROCEDURE" -> MySQL Error 1054 (42S22): Unknown column 'sys' in 'where clause' 2. The error handler then crashes, so the UI never receives the error: File "...\gui_plugin\core\dbms\DbSession.py", line 254, in terminate_thread self._message_callback("ERROR", self.thread_error) TypeError: DbModuleSession.on_session_message() missing 1 required positional argument: 'result' MySQL Workbench 8.0 connects to the same servers without issues. Removing ANSI_QUOTES from sql_mode works around the problem. How to repeat: 1. SET GLOBAL sql_mode = CONCAT('ANSI_QUOTES,', @@GLOBAL.sql_mode); 2. Open MySQL Workbench 26.7.1 on Windows and open a connection to that server. 3. The editor stays on "Starting editor session..." forever. Suggested fix: Use single quotes for string literals in internal queries, and fix the on_session_message() callback signature so errors are reported to the UI.