RE: Did NOT condition on VARCHAR change with 5.0.45?

2008-01-23 Thread Jerry Schwartz
 -Original Message-
 From: Mont McAdam [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 22, 2008 7:18 PM
 To: mysql@lists.mysql.com
 Subject: Re: Did NOT condition on VARCHAR change with 5.0.45?

 `method` is the name of the column in the table.

 In my opinion it should return every record from the table where
 `method` is
 equal to NULL, ZERO or EMPTY STRING, as this table doesn't allow null,
 and
 the field type is varchar, this would be EMPTY STRING's only.

 This has always worked in the past. However now EVERY row is returned
 regardless of the contents of `method`.
[JS] I'm running 4.1.22:

mysql select  = true;
+---+
|  = true |
+---+
| 0 |
+---+




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Did NOT condition on VARCHAR change with 5.0.45?

2008-01-23 Thread Perrin Harkins
On Jan 22, 2008 7:18 PM, Mont McAdam [EMAIL PROTECTED] wrote:
 In my opinion it should return every record from the table where `method` is
 equal to NULL, ZERO or EMPTY STRING, as this table doesn't allow null, and
 the field type is varchar, this would be EMPTY STRING's only.

Although it doesn't matter here because of the NOT NULL, this will
never match NULL values.  NULL values are neither true nor untrue, so
they have to be checked with IS NULL.  This is standard, not a MySQL
thing.

- Perrin

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Did NOT condition on VARCHAR change with 5.0.45?

2008-01-22 Thread Mont McAdam
`method` is the name of the column in the table.

In my opinion it should return every record from the table where `method` is
equal to NULL, ZERO or EMPTY STRING, as this table doesn't allow null, and
the field type is varchar, this would be EMPTY STRING's only. 

This has always worked in the past. However now EVERY row is returned
regardless of the contents of `method`.

Thoughts?

 What is method mean in your sql statement?
 
 On Jan 15, 2008 5:33 PM, Martijn Tonies [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I am having a problem with MySQL 5.0.45 returning what I consider to be
  unexpected results.
  
  Basically I am attempting the following query, and ALL records are being
  returned.
  
   SELECT * FROM `jos_products_orders` WHERE NOT `method`  
 
  For the uninformed, what should this do according to you?
 
  Martijn Tonies
  Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle
  
  MS SQL Server
  Upscene Productions
  http://www.upscene.com
  My thoughts:
  http://blog.upscene.com/martijn/
  Database development questions? Check the forum!
  http://www.databasedevelopmentforum.com
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/mysql?unsub=1
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Did NOT condition on VARCHAR change with 5.0.45?

2008-01-15 Thread Martijn Tonies
Hi,

I am having a problem with MySQL 5.0.45 returning what I consider to be
unexpected results.

Basically I am attempting the following query, and ALL records are being
returned.

 SELECT * FROM `jos_products_orders` WHERE NOT `method`  

For the uninformed, what should this do according to you?

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle 
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Did NOT condition on VARCHAR change with 5.0.45?

2008-01-15 Thread Moon's Father
What is method mean in your sql statement?

On Jan 15, 2008 5:33 PM, Martijn Tonies [EMAIL PROTECTED] wrote:

 Hi,

 I am having a problem with MySQL 5.0.45 returning what I consider to be
 unexpected results.
 
 Basically I am attempting the following query, and ALL records are being
 returned.
 
  SELECT * FROM `jos_products_orders` WHERE NOT `method`  

 For the uninformed, what should this do according to you?

 Martijn Tonies
 Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle
 
 MS SQL Server
 Upscene Productions
 http://www.upscene.com
 My thoughts:
 http://blog.upscene.com/martijn/
 Database development questions? Check the forum!
 http://www.databasedevelopmentforum.com


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]




-- 
I'm a mysql DBA in china.
More about me just visit here:
http://yueliangdao0608.cublog.cn