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/[EMAIL PROTECTED]



Reply via email to