distal-attribute
distal-attribute
distal-attribute
distal-attribute

Mayor problem - reverted to prev. versions.

User, date Message
Written by BubikolRamios
1 year ago
Category: General
326 posts since Thu, 14 Jan 10
v.7.00.4312 ALL OK !

New werions:
1. got stored proc, inside:

select distinct(field)
from table
WHERE data not REGEXP '^(-|+){0,1}([0-9]+.[0-9]*|[0-9]*.[0-9]+|[0-9]+)$';

--> SQL Error (1139): Got error 'repetition-operator operand invalid' from regexp

besides, note, doh not tested, I guess this:

SET str = CONCAT(str,'where data REGEXP '^[0-9]{2}$'');

should be escaped ? It does not have to be, it works anyway on 7.00.4312.

Written by BubikolRamios
1 year ago
326 posts since Thu, 14 Jan 10
edit:

sure thing is that this (inside stored proc):

SET str = CONCAT(str,'where data REGEXP '^[0-9]{2}$'');

stored proc can be saved on v.7.00.4312, on nevest version not.
Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
I cannot fully understand what you're trying to tell here, but I highly guess you are running into a server bug:
http://bugs.mysql.com/bug.php?id=58342
http://bugs.mysql.com/bug.php?id=62129
Right?
Written by BubikolRamios
1 year ago
326 posts since Thu, 14 Jan 10
Hmm possible, server error. Strange manifestation. Running things for 3+ months, all OK. Only editor HSQL. Looks like it eats out '\' charater.

And then you see code like this:

SET str = CONCAT(str,'where data REGEXP '^[0-9]{2}$'');

escape character missing.

Open (and you opened presumably good code), add space, to enable save, cick and it reports error.

Thanks.

I do not know how that happened. I did many changes to stored proc, saved it and all was OK.
Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
Did you read the server bug report? Does not sound so.
Written by BubikolRamios
1 year ago
326 posts since Thu, 14 Jan 10
See forinstance this two regex expressions. The upper (from backup) is good, the lower is corrupt. I did nothing to it 100% sure. In the same way all other strings in stored proc were 'destroyed'.

'^(-|\\+){0,1}([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$'
'^(-|\+){0,1}([0-9]+\.[0-9]*|[0-9]*\.[0-9]+|[0-9]+)$'

There are only 2 posibilites what dit this here, server or client
Written by kalvaro
1 year ago
564 posts since Thu, 29 Nov 07
I get the same error when I run your select query from the official command-line client:

mysql> select distinct(field)
-> from `table`
-> WHERE data not REGEXP '^(-|+){0,1}([0-9]+.[0-9]*|[0-9]*.[0-9]+|[0-9]+)$';
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp



If you are looking for a literal + you need to escape it:

mysql> select * from `table` WHERE data not REGEXP '(-|+){1}';
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp
mysql> select * from `table` WHERE data not REGEXP '(-|\\+){1}';
Empty set (0.00 sec)

Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
Yes, man. Please click on the above links and read the reports. That's exactly what you are experiencing, isn't it?
Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
oh, sorry kalvaro, my post was meant as a reply to BubikolRamios.
Written by BubikolRamios
1 year ago
326 posts since Thu, 14 Jan 10


column routine_definition, omits one quote when the original text included escaped quotes ... typical case dynamic sql ...



I that cases ' dissapear via dynamic sql.

Point is, I had plain sql in stored proc, like:

select * from `table` WHERE data not REGEXP '(-|\\+){1}';

saved it, not changed a bit, a zilion times

and then with no reason it appeared saved like (minus 1 \):

select * from `table` WHERE data not REGEXP '(-|\+){1}';
Written by BubikolRamios
1 year ago
326 posts since Thu, 14 Jan 10
That is, I open stored proc in hsql, try to save it back , exactly the same and it does not let do it. When, where, how it become corrupted, I don't know. I don't think links above describes that.
Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
Well, they do... Backslashes in procedure definitions gets stripped in IS.ROUTINES. That's what I was trying to tell you with these links.
Written by ansgar
1 year ago
4800 posts since Fri, 07 Apr 06
See issue #3107.
 

Please login to leave a reply, or register at first.