|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
jcsmith
Joined: 01 Jan 2010 Posts: 1 Country: United States |
|
SQL 4.8 and MySQL bug? |
|
There seems to be a bug with MySQL and SQL assistant that comes back with bad results.
if you select and integer field after a date field, the integer field is almost always mucked up.
if you select the integer field before the date field, the content seems to be correct.
Anyone else seeing this? Is this an isolated incident specific to MySQL?
(See the create table statements below)
select * from sale; <-- all the quantity returned incorrect values because quantity is after sales_date
select sales_date, id from sale; <--- note that the id does not return 1,2,3,4,5 in my case, all the id returns 5
select quantity, id from sale; <--- this seems to be OK
Can be reproduced with MySQL 5.x server (windows and linux)
Using notepad on XP SP3 with MySQL Native connection type ( with various versions of libmysql.dll as well including the latest from MySQL.com http://dev.mysql.com/downloads/connector/c/6.0.html ).
I press Ctrl-Shfit-F9 to see the results for each statement
mysql command line client + other MySQL tools comes back with the correct results.
CREATE TABLE sale (
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
sales_date DATE,
quantity INTEGER,
price DECIMAL(9,2)
);
INSERT INTO sale ( id, sales_date, quantity, price ) VALUES ( 1, '2009-02-27', 1, 29.95 );
INSERT INTO sale ( id, sales_date, quantity, price ) VALUES ( 2, '2009-02-27', 2, 29.95 );
INSERT INTO sale ( id, sales_date, quantity, price ) VALUES ( 3, '2009-02-27', 3, 29.95 );
INSERT INTO sale ( id, sales_date, quantity, price ) VALUES ( 4, '2009-02-27', 4, 29.95 );
INSERT INTO sale ( id, sales_date, quantity, price ) VALUES ( 5, '2009-02-27', 5, 29.95 );
|
|
Fri Jan 01, 2010 12:44 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
Thank you. I was able to reproduce this issue. There seems to be some data overflow causing this weird effect. I'm going to submit this issue to further investigation
|
|
Sat Jan 02, 2010 10:11 am |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|