Bug #57244 Search Replace in SQL builder failed
Submitted: 5 Oct 2010 12:03 Modified: 12 Oct 2010 15:34
Reporter: James Burton Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.28 CE (against MySQL 5.5.6-rc) OS:Windows (Win2k3)
Assigned to: CPU Architecture:Any
Tags: bug, REPLACE, search

[5 Oct 2010 12:03] James Burton
Description:
If you select some of the SQL and try to do a "Replace All" search for double quote, to replace with the leaning single quote (e.g. " and `) then it generates an "Unexpected error".

How to repeat:
Select a block of SQL, using " as the delimiter (as I had found exported from Drupal), and try to replace all occurences with `.

Suggested fix:
Correct the Search/Replace routines, at least for Replace All, probably checking how it handles quotes.
[5 Oct 2010 13:04] Valeriy Kravchuk
What exact version of MySQL Workbench, 5.2.x, do you use?
[5 Oct 2010 13:26] James Burton
This is using version 5.2.28 CE (Revision 6722)
[5 Oct 2010 13:33] MySQL Verification Team
Thank you for the bug report.
[7 Oct 2010 10:22] Tony Walker
When doing search and replace of all instances of a string in an existing SQL file, get the error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: length".
To repeat:
  Open a SQL file in SQL Editor.
  Open replace dialogue.
  Enter text to find.
  Enter text to replace.
  Click 'Replace All'
On XP SP3, using Workbench 5.2.28CE, database version slightly irrelevant.
[12 Oct 2010 12:59] Valeriy Kravchuk
This is a duplicate of bug #56898.
[12 Oct 2010 15:34] James Burton
If anyone knows how to remove me from notifications for this bug, then please do so immediately.  I only reported it because I may be forced to work with this ropey MySQL crap again in the future.  Please stop this from emailing me if you can!