Bug #28636 MySQL Query Browser RegEx Text Import mishandling of $RegEx1.10
Submitted: 23 May 2007 22:51 Modified: 11 Mar 2009 11:17
Reporter: Oliver Wilcock Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S4 (Feature request)
Version:1.2.12 OS:Windows
Assigned to: CPU Architecture:Any

[23 May 2007 22:51] Oliver Wilcock
Description:
The RegEx Text Importer is marvelous except it breaks on the 10th match expression.

Handling of 
$RegEx1.1
$RegEx1.2
$RegEx1.3
works fine.

$RegEx1.10 returns the same string as $RegEx1.1 instead of what it should (with a 0 appended).  That is, the replacement engine stops after reading the first character after the dot.

How to repeat:
Using MySQL Query Browser:

1.  Create a text file with the following content and save it:
0123456789ABCDEFG

2.  Load the file created in the previous step as the source text file.
3.  Paste the following regular expression
(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)
4.  Observe the left pane, the parse structure, matches the appropriate values.
5.  Drag $10 from the left pane to the trigger insert statement.  Observe the syntax it inserts is consistent with expectations.
6.  Replace all of the text in the trigger insert statement with the following:
$RegEx1.1
$RegEx1.2
$RegEx1.10
$RegEx1.11
7.  Press the Preview button.
Expected output:
0
1
9
A
1 row(s) processed.

Actual output:
0
1
00
01
1 row(s) processed.

Suggested fix:
The parse expression probably eats exactly one character following the dot, instead it should eat all numeric characters following the dot.

The alternate syntax ${RegEx1.10} would be useful to mark the end of the placeholder item where a literal digit should follow the placeholder.  This syntax will be familar from bash scripts and, if remember correctly, perl.

What I mean by placeholder in the previous sentence is a string such as $RegEx1.11.
[23 May 2007 23:13] Oliver Wilcock
Here's another TODO item.  Since there is no claim that this should work, it might not be a bug.

Consider the following match expression and use of a placeholder:
$1 = "O'Shea"

LastName = '$RegEx1.1'

How does one invoke escaping of ' and other potentially problematic characters?

The workaround for the above single quote is:
LastName = "$RegEx1.1"

But this has obvious shortcomings...
[24 May 2007 4:17] Valeriy Kravchuk
Thank you for a problem report. I think, it is just about valid feature requests.
[11 Mar 2009 11:17] Susanne Ebrecht
Many thanks for writing a bug report. We are on the way to implement full functionality of MySQL Query Browser into MySQL Workbench. We won't add this feature request anymore.

More informations about MySQL Workbench you will find here:

http://dev.mysql.com/workbench/