RE: Did NOT condition on VARCHAR change with 5.0.45?
-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?
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?
`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?
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?
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
Did NOT condition on VARCHAR change with 5.0.45?
Hi there, 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` I have pasted table structure, and some sample data below. This worked fine up until a recent system update and seems to be ignored now. Mont - -- CREATE TABLE IF NOT EXISTS `jos_products_orders` ( `id` int(11) NOT NULL auto_increment, `customer` int(11) NOT NULL, `ordered` datetime NOT NULL, `paid` int(11) NOT NULL default '0', `released_by` int(11) NOT NULL, `paid_at` datetime NOT NULL, `method` varchar(10) NOT NULL, `order` text NOT NULL, `amount` float NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=215 ; -- -- Dumping data for table `jos_products_orders` -- INSERT INTO `jos_products_orders` (`id`, `customer`, `ordered`, `paid`, `released_by`, `paid_at`, `method`, `order`, `amount`) VALUES(126, 65, '2007-11-21 20:10:52', 1, 0, '2007-11-21 20:17:25', 'CREDIT', '6;1;2;14.3;Aviator - Silver with Black Lens\r\n13;1;1;14.3;Fastbacks - Black with Black Lens\r\n19;4;1;14.3;Hotshot - Leopard with Amber Lens\n4;2;2;14.3;Ice - Gunmetal with Black lens\r\n3;3;4;14.3;Razor - Electric Blue with Black Lens\n1;1;3;14.3;Slider - Black with Black Lens\r\n', 185.9); INSERT INTO `jos_products_orders` (`id`, `customer`, `ordered`, `paid`, `released_by`, `paid_at`, `method`, `order`, `amount`) VALUES(158, 790, '2007-12-05 16:48:18', 1, 65, '2007-12-05 16:50:32', 'CASH', '15;1;1;14.3;Bluefins - Black with Black Lens\r\n13;4;1;14.3;Fastbacks - Brown with Amber Lens\r\n17;2;1;14.3;Microlite - Black with Black Lens\r\n9;3;1;14.3;Radiator - Black with Black Lens\r\n3;1;1;14.3;Razor - Black with Black Lens\r\n1;1;1;14.3;Slider - Black with Black Lens\r\n8;1;1;14.3;Surfer - Silver with Black Lens\r\n8;3;1;14.3;Surfer - Black with Black Lens\r\n10;3;1;14.3;Tropics - Silver with Black Lens\r\n7;2;1;14.3;Wayfarer Style - Brown with Brown Lens\n', 143); INSERT INTO `jos_products_orders` (`id`, `customer`, `ordered`, `paid`, `released_by`, `paid_at`, `method`, `order`, `amount`) VALUES(157, 217, '2007-11-30 16:27:53', 1, 0, '2007-11-30 16:33:35', 'CREDIT', '6;1;1;14.3;Aviator - Silver with Black Lens\r\n4;1;1;14.3;Ice - Black with Black Lens\r\n17;4;1;14.3;Microlite - Leopard with Amber Lens\n5;2;1;14.3;Navigator - Silver with Black Lens\r\n3;1;2;14.3;Razor - Black with Black Lens\r\n3;2;2;14.3;Razor - Leopard with Black lens\r\n1;1;1;14.3;Slider - Black with Black Lens\r\n1;2;1;14.3;Slider - Bronze with Black Lens\r\n1;3;1;14.3;Slider - Amber with Amber Lens\n8;3;1;14.3;Surfer - Black with Black Lens\r\n10;2;1;14.3;Tropics - Gunmetal with Black Lens\r\n10;4;1;14.3;Tropics - Black with Black Lens\r\n7;2;1;14.3;Wayfarer Style - Brown with Brown Lens\n', 214.5); -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]