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

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

am 04.03.2010 04:22:15 von wang shuming

--000e0cd21166021c000480f11bc7
Content-Type: text/plain; charset=ISO-8859-1

Hi,
select * from t1

ordno qty
1
3
5
'aaa' 18
'bbbbb' 20

select * from t1 where ordno=' ' or ordno>' '
ordno qty
1
3
5
'aaa' 18
'bbbbb' 20

select * from t1 where ordno>=' '
ordno qty
'aaa' 18
'bbbbb' 20

mysql version 5.1.44 still with the bug

Best regards!
Shuming Wang

--000e0cd21166021c000480f11bc7--

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

am 04.03.2010 07:55:33 von Dan Nelson

In the last episode (Mar 04), wang shuming said:
> select * from t1
>
> ordno qty
> 1
> 3
> 5
> 'aaa' 18
> 'bbbbb' 20

Are your first three rows really blank, or are there nonprintable characters
in 'ordno' that aren't showing up here?

You need to provide us with the table definition and the insert statements
needed to create the t1 table and its data. Can you attach the output of
"mysqldump --skip-opt mydb t1" ?

> select * from t1 where ordno=' ' or ordno>' '
> ordno qty
> 1
> 3
> 5
> 'aaa' 18
> 'bbbbb' 20
>
> select * from t1 where ordno>=' '
> ordno qty
> 'aaa' 18
> 'bbbbb' 20
>
> mysql version 5.1.44 still with the bug
>
> Best regards!
> Shuming Wang

--
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

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

am 04.03.2010 09:17:22 von wang shuming

--0016368e23e070fbbb0480f53a5e
Content-Type: text/plain; charset=ISO-8859-1

Oh,
If any char fields add to index key ,then the >=' ' gets wrong .

ordno, qty ,mem
1
3
5
aaa 18
bbbbb 20

1. CREATE TABLE `t1` (
`mid` int(11) NOT NULL,
`qty` decimal(12,2) NOT NULL DEFAULT '0.00',
`ordno` char(8) NOT NULL DEFAULT '',
`mem` char(1) DEFAULT '',
PRIMARY KEY (`mid`),
KEY `key03` (`ordno`))

select * from t1 where ordno>=' '
gets wrong result 2 rows

2CREATE TABLE `t1` (
`mid` int(11) NOT NULL,
`qty` decimal(12,2) NOT NULL DEFAULT '0.00',
`ordno` char(8) NOT NULL DEFAULT '',
`mem` char(1) DEFAULT '',
PRIMARY KEY (`mid`))

select * from t1 where ordno>=' '
gets OK 5 rows

3.CREATE TABLE `t1` (
`mid` int(11) NOT NULL,
`qty` decimal(12,2) NOT NULL DEFAULT '0.00',
`ordno` char(8) NOT NULL DEFAULT '',
`mem` char(1) DEFAULT '',
PRIMARY KEY (`mid`),
KEY `key03` (`mem`))

select * from t1 where mem>=' '
0 rows wrong

4.CREATE TABLE `t1` (
`mid` int(11) NOT NULL,
`qty` decimal(12,2) NOT NULL DEFAULT '0.00',
`ordno` char(8) NOT NULL DEFAULT '',
`mem` char(1) DEFAULT '',
PRIMARY KEY (`mid`))

select * from t1 where mem>=' '
5 rows OK

Regards!

Shuming wang

--0016368e23e070fbbb0480f53a5e--

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

am 04.03.2010 21:07:11 von Peter Brawley

--------------010409020401050409030508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Wang,

> select * from t1 where ordno>=' '
gets wrong result 2 rows

I doubt you'll get many helpful responses till you post the INSERTs.

PB

-----

wang shuming wrote:
> Oh,
> If any char fields add to index key ,then the >=' ' gets wrong .
>
> ordno, qty ,mem
> 1
> 3
> 5
> aaa 18
> bbbbb 20
>
> 1. CREATE TABLE `t1` (
> `mid` int(11) NOT NULL,
> `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
> `ordno` char(8) NOT NULL DEFAULT '',
> `mem` char(1) DEFAULT '',
> PRIMARY KEY (`mid`),
> KEY `key03` (`ordno`))
>
> select * from t1 where ordno>=' '
> gets wrong result 2 rows
>
> 2CREATE TABLE `t1` (
> `mid` int(11) NOT NULL,
> `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
> `ordno` char(8) NOT NULL DEFAULT '',
> `mem` char(1) DEFAULT '',
> PRIMARY KEY (`mid`))
>
> select * from t1 where ordno>=' '
> gets OK 5 rows
>
> 3.CREATE TABLE `t1` (
> `mid` int(11) NOT NULL,
> `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
> `ordno` char(8) NOT NULL DEFAULT '',
> `mem` char(1) DEFAULT '',
> PRIMARY KEY (`mid`),
> KEY `key03` (`mem`))
>
> select * from t1 where mem>=' '
> 0 rows wrong
>
> 4.CREATE TABLE `t1` (
> `mid` int(11) NOT NULL,
> `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
> `ordno` char(8) NOT NULL DEFAULT '',
> `mem` char(1) DEFAULT '',
> PRIMARY KEY (`mid`))
>
> select * from t1 where mem>=' '
> 5 rows OK
>
> Regards!
>
> Shuming wang
>
>
> ------------------------------------------------------------ ------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.435 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10 19:34:00
>
>

--------------010409020401050409030508--