11 messages in com.mysql.lists.bugsBug with user defined variables (all ...
FromSent OnAttachments
Georg Richter19 Jan 2003 14:38 
Georg Richter20 Jan 2003 10:53 
Sinisa Milivojevic20 Jan 2003 11:11 
Paul DuBois20 Jan 2003 11:12 
Paul DuBois20 Jan 2003 11:31 
Sinisa Milivojevic20 Jan 2003 11:33 
Sinisa Milivojevic20 Jan 2003 11:43 
Sinisa Milivojevic20 Jan 2003 12:03 
Benjamin Pflugmann20 Jan 2003 13:01 
Sinisa Milivojevic21 Jan 2003 05:09 
Jocelyn Fournier21 Jan 2003 17:03 
Subject:Bug with user defined variables (all versions)
From:Georg Richter (geo@php.net)
Date:01/19/2003 02:38:20 PM
List:com.mysql.lists.bugs

Hi,

(tested with 3.23, 4.0.9 and 4.1)

how-to-repeat:

mysql> create table a (a int); Query OK, 0 rows affected (0.02 sec)

mysql> insert into a values (1),(2),(3),(4),(5); Query OK, 5 rows affected (0.00 sec) Records: 5 Duplicates: 0 Warnings: 0

mysql> set @a:=1; Query OK, 0 rows affected (0.00 sec)

mysql> select @a:=a from a where @a = 1000; +-------+ | @a:=a | +-------+ | 1 | | 2 | | 3 | | 4 | +-------+ 4 rows in set (0.00 sec)

mysql> select @a:=a from a where @a <> 1000; +-------+ | @a:=a | +-------+ | 1 | | 2 | | 3 | | 4 | +-------+ 4 rows in set (0.00 sec)

Why does WHERE Clause always return true?!

Regards

Georg

P.S: Another sample, http://www.sc-leinfelden.de/mysql/t186.html works well