Mayor problem - reverted to prev. versions.

BubikolRamios's profile image BubikolRamios posted 11 years ago in General Permalink
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.

BubikolRamios's profile image BubikolRamios posted 11 years ago Permalink
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.
ansgar's profile image ansgar posted 11 years ago Permalink
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?
BubikolRamios's profile image BubikolRamios posted 11 years ago Permalink
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.
ansgar's profile image ansgar posted 11 years ago Permalink
Did you read the server bug report? Does not sound so.
BubikolRamios's profile image BubikolRamios posted 11 years ago Permalink
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
kalvaro's profile image kalvaro posted 11 years ago Permalink
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)
ansgar's profile image ansgar posted 11 years ago Permalink
Yes, man. Please click on the above links and read the reports. That's exactly what you are experiencing, isn't it?
ansgar's profile image ansgar posted 11 years ago Permalink
oh, sorry kalvaro, my post was meant as a reply to BubikolRamios.
BubikolRamios's profile image BubikolRamios posted 11 years ago Permalink
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}';
BubikolRamios's profile image BubikolRamios posted 11 years ago Permalink
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.
ansgar's profile image ansgar posted 11 years ago Permalink
Well, they do... Backslashes in procedure definitions gets stripped in IS.ROUTINES. That's what I was trying to tell you with these links.
ansgar's profile image ansgar posted 11 years ago Permalink
See issue #3107.

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