473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Possible regexp bug in 4.1a?

I recently upgraded to 4.1 alpha (MySQL 4.1.0-alpha-standard-log) on
my Linux server, and came across a problem with a query that had been
working in 3.23 that no longer worked in 4.1a. I've simplified the
query to demonstrate the problem:

select trim(upper('foo')) regexp ('^foo$') as trimUpper,
upper('foo') regexp ('^foo$') as justUpper,
trim('foo') regexp ('^foo$') as justTrim,
trim(upper('foo')) as trimUpperFoo,
upper('foo') as upperFoo,
trim('foo') as trimFoo ;

Running this under 4.1a, I get:

+-----------+-----------+----------+--------------+----------+---------+
| trimUpper | justUpper | justTrim | trimUpperFoo | upperFoo | trimFoo |
+-----------+-----------+----------+--------------+----------+---------+
| 0 | 1 | 1 | FOO | FOO | foo |
+-----------+-----------+----------+--------------+----------+---------+
1 row in set (0.00 sec)

I then ran the same query on a Windows machine that is also running
4.1a, and got the same results. I then had an associate run this under
both 3.23.52 and 4.0.14-standard, and in both cases he got the results
I would expect:

+-----------+-----------+----------+--------------+----------+---------+
| trimUpper | justUpper | justTrim | trimUpperFoo | upperFoo | trimFoo |
+-----------+-----------+----------+--------------+----------+---------+
| 1 | 1 | 1 | FOO | FOO | foo |
+-----------+-----------+----------+--------------+----------+---------+
1 row in set (0.37 sec)

I've tried variations on this query, and it seems that nesting two
functions as the argument to regexp causes the match to fail. Am I
missing something obvious, or should I report this as a bug?

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://opentech.leafe.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1372

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lukas Holcik | last post by:
Hi everyone! How can I simply search text for regexps (lets say <a href="(.*?)">(.*?)</a>) and save all URLs(1) and link contents(2) in a dictionary { name : URL}? In a single pass if it could....
0
by: Ed Leafe | last post by:
I recently upgraded to 4.1 alpha (MySQL 4.1.0-alpha-standard-log) on my Linux server, and came across a problem with a query that had been working in 3.23 that no longer worked in 4.1a. I've...
23
by: John | last post by:
Last year, I remember finding a web page describing how to pass the name of a file to another web page, and have that web page load that image file. Now, I can't find my record of that (it was...
0
by: Chris Croughton | last post by:
I'm trying to use the EXSLT regexp package from http://www.exslt.org/regexp/functions/match/index.html (specifically the match function) with the libxml xltproc (which supports EXSLT), but...
4
by: Jon Maz | last post by:
Hi All, I want to strip the accents off characters in a string so that, for example, the (Spanish) word "práctico" comes out as "practico" - but ignoring case, so that "PRÁCTICO" comes out as...
26
by: Matt Kruse | last post by:
Are there any current browsers that have Javascript support, but not RegExp support? For example, cell phone browsers, blackberrys, or other "minimal" browsers? I know that someone using Netscape...
32
by: Licheng Fang | last post by:
Basically, the problem is this: 'do' Python's NFA regexp engine trys only the first option, and happily rests on that. There's another example: 'oneself' The Python regular expression...
4
by: Matt | last post by:
Hello all, I have just discovered (the long way) that using a RegExp object with the 'global' flag set produces inconsistent results when its test() method is executed. I realize that 'global'...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.