5.1.42 community version select ordno>=" " error (2)

5.1.42 community version select ordno>=" " error (2)

am 02.03.2010 05:10:39 von wang shuming

--001636e0a70f70ded70480c98c9c
Content-Type: text/plain; charset=ISO-8859-1

Hi,

Any table with a ordno char(n) not null field

for example

ordno qty
35
0
1
'abc' 3
'000' 100

select * from table1 where ordno>' ' or ordno=' '
> 5 rows

select * from table1 where ordno>=' '
> 2 rows

best regard!
Shuming Wang

--001636e0a70f70ded70480c98c9c--

Re: 5.1.42 community version select ordno>=" " error (2)

am 02.03.2010 06:54:10 von Dan Nelson

In the last episode (Mar 02), wang shuming said:
> Hi,
>
> Any table with a ordno char(n) not null field
>
> for example
>
> ordno qty
> 35
> 0
> 1
> 'abc' 3
> '000' 100
>
> select * from table1 where ordno>' ' or ordno=' '
> > 5 rows
>
> select * from table1 where ordno>=' '
> > 2 rows

I cannot reproduce this, with either mysql 5.1.35 or 5.5.1-m2:

mysql> create table table1 (ordno char(3) not null);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into table1 values (' '),(' '),(' '),('000'),('abc');
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql> select * from table1 where ordno>=' ';
+-------+
| ordno |
+-------+
| |
| |
| |
| 000 |
| abc |
+-------+
5 rows in set (0.00 sec)

mysql> select * from table1 where ordno>' ' or ordno=' ';
+-------+
| ordno |
+-------+
| |
| |
| |
| 000 |
| abc |
+-------+
5 rows in set (0.00 sec)

mysql>

--
Dan Nelson
dnelson@allantgroup.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org