Ed Leafe <[EMAIL PROTECTED]> wrote:
>        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?
> 

Seems, it's a known bug, because I got on my 4.1.1 MySQL server:

mysql> 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 ;
+-----------+-----------+----------+--------------+----------+---------+
| trimUpper | justUpper | justTrim | trimUpperFoo | upperFoo | trimFoo |
+-----------+-----------+----------+--------------+----------+---------+
|         1 |         1 |        1 | FOO          | FOO      | foo     |
+-----------+-----------+----------+--------------+----------+---------+
1 row in set (0.00 sec)



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.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