List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:July 26 1999 5:54pm
Subject:Re: order by bug in 3.23.1
View as plain text  
jgauthier@stripped wrote:
> 
> >Description:
>    select * from table order by rowid seems to be returning
>         the rows in descending order. where rowid is a smallint.
>         adding the 'desc' flag returns it the same way. This
>         does not break when a where clause is used..
> >How-To-Repeat:
>         just do  select field  from table order by field.
> >Fix
>    Unknown
> 
> >Submitter-Id:  <submitter ID>
> >Originator:
> >Organization:
> 
> >MySQL support: none
> >Synopsis:      order by bug in 3.23.1
> >Severity:      critical
> >Priority:      high
> >Category:      mysql
> >Class:         sw-bug
> >Release:       mysql-3.23.1-alpha (Source distribution)
> >Server: /opt/mysql/bin/mysqladmin  Ver 7.11 Distrib 3.23.1-alpha, for
> pc-linux-gnu on i586
> TCX Datakonsult AB, by Monty
> 
> Server version          3.23.1-alpha
> Protocol version        10
> Connection              Localhost via UNIX socket
> UNIX socket             /tmp/mysql.sock
> Uptime:                 3 days 22 min 44 sec
> 
> Threads: 1  Questions: 11872  Slow queries: 12  Opens: 7740  Flush tables: 1  Open
> tables: 63
> >Environment:
> System: Linux intranet.cablestogo.com 2.2.10 #2 Tue Jun 29 07:59:53 EDT 1999 i586
> unknown
> Architecture: i586
> 
> Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
> GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> Compilation info: CC='gcc'  CFLAGS='-O3'  CXX='c++'  CXXFLAGS='-O3'  LDFLAGS=''
> Configure command: ./configure  --prefix=/opt/mysql --enable-assembler
> Perl: This is perl, version 5.005_03 built for i386-linux
> 
>

I was unable to replicate it. Here is what I did:


mysql> create table test4 ( n smallint);   
Query OK, 0 rows affected (0.01 sec)

mysql> insert into test4 values (123), (16), (23), (11);
Query OK, 4 rows affected (0.01 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql> select * from test4 order by n;
+------+
| n    |
+------+
|   11 |
|   16 |
|   23 |
|  123 |
+------+
4 rows in set (0.01 sec)

mysql> select * from test4 order by n desc;
+------+
| n    |
+------+
|  123 |
|   23 |
|   16 |
|   11 |
+------+
4 rows in set (0.00 sec)

If you can replicate it, post the exact commands you've run and the
output of MySQL.

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
order by bug in 3.23.1jgauthier26 Jul
  • Re: order by bug in 3.23.1Paul DuBois26 Jul
  • Re: order by bug in 3.23.1Sasha Pachev26 Jul