> This means anytime a user defined variable like "@num := @num + 1" and is
> used in a query that is sorted, it is going to have to be changed to a
> subquery. For example, if someone was using it to display detail line item
> numbers on an invoice, it now has to be turned into a subselect. This breaks
> a lot of code. Yes your solution works (thanks for that), but I still think
> this is a bug.

It's certainly not a bug, just a change in behavior.  User-defined
variables carry a pretty hefty warning:

http://dev.mysql.com/doc/refman/5.0/en/user-variables.html

The order of evaluation for user variables is undefined....

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to