Description:
The query gets format characters in the history, upon reopening, referring to History, and loading the query from the history, the query is formatted differently.
I did try searching out through bugs to see if this was already known but the results did not agree with my repeat description below.
How to repeat:
- Open a SQL Editor Connection.
- Execute query as:
SELECT * FROM MyTABLE WHERE Timestamp BETWEEN '2011-09-01 00:00:00' AND '2011-09-15 00:00:00'
- Close Workbench after query successfully completes.
- Load Up Workbench, SQL Editor.
- Click Output Tab after opening the Server connection.
- Choose History radio button.
- Scroll to the date of the query you ran.
- The query appears as:
SELECT * FROM MyTABLE WHERE Timestamp BETWEEN '2011-09-01 00:00:00' AND '2011-09-15 00:00:00';
- Right click, choose Replace the query into the editor (so you can execute it).
- Attempt to Execute the query - it never completes (does not seem to execute it).
The issue is the replacing of special characters such as newline with 0x?? and ' with ' - these should be reverted back upon reloading back into the query editor (or stored as they were typed to begin with).
Editing the query to be correct - that is, manually replacing ' with ' still does not get successful results from the query - no results occur (query is valid).
Creating a new connection by going back to the Home Tab, and opening another connection to the same server, and then pasting the correct query does get results.
Checking the server administration side to see if the query is hanging or not just shows the connection is sleeping.
Suggested fix:
Store the query as it was typed within the editor, or, revert the characters back to the correct characters in the Replace / Append methods.