insert .. select with order by problem

Alejandro Paz <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Hallo everyone !

Im using Mysql 4.0.12 on RedHat 7.3 x86
I know it's not the last binary but I cannot upgrade
now. (And i saw nothing about this in the changelog
for 4.013 and 4.0.14)

I found the following : 

I have two tables :

Stock (InnoDB, primary key on d):

a char (16)
b char (20)
c char (20)
d int
e decimal (9,2)
h int
i int

PTemp (MyISAM, no keys):

d int
e decimal
f int
g char (1)

And the statement is

insert into PTemp select d,e,32,'E' from Stock where
h<i order by a,b,c

I test the statement in the mysql cli and I get the
results well sorted.
When I use the same statement in my application (built
with C, and statically linked
to libmysqlclient.a) I get the reversed order.

I checked the log and both statements are equal, (but
the two users are different, 
the mysql cli user is root, and the other just have
enough permissions to select,
update,delete ad insert in the tables).

I would like to know what happens.

Thanks in advance.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.