List:General Discussion« Previous MessageNext Message »
From:BAUMEISTER Alexandre Date:October 29 1999 3:24pm
Subject:Maybe a BUG in dates ordering ...
View as plain text  
Hi,

  I have a problem with order on dates with Mysql 3.22.26a .

  Below is the description of a table which contains about 80000 rows.

  The table was created with :

create table intraday_PAR (
  symbole char(20) NOT NULL,
  date datetime NOT NULL,
  first real(17,5) NOT NULL,
  high real(17,5) NOT NULL,
  low real(17,5) NOT NULL,
  last real(17,5) NOT NULL,
  volume int NOT NULL,
  unique(symbole,date),
  index idx_symbole (symbole),
  index idx_date (date)
);


  The table is doped an re-created each morning and filled with data
  all day long (these are shares quotations informations).

  Everything works quite well, but when the server on which is hosted
  the database becomes a little loaded, the we have some strange
  ordering results from Mysql.

  Maybe a bug ? Any idea ?

mysql> desc intraday_PAR;
mysql> +---------+--------------+------+-----+---------------------+-------+
mysql> | Field   | Type         | Null | Key | Default             | Extra |
mysql> +---------+--------------+------+-----+---------------------+-------+
mysql> | symbole | char(20)     |      | PRI |                     |       |
mysql> | date    | datetime     |      | PRI | 0000-00-00 00:00:00 |       |
mysql> | first   | double(17,5) |      |     | 0.00000             |       |
mysql> | high    | double(17,5) |      |     | 0.00000             |       |
mysql> | low     | double(17,5) |      |     | 0.00000             |       |
mysql> | last    | double(17,5) |      |     | 0.00000             |       |
mysql> | volume  | int(11)      |      |     | 0                   |       |
mysql> +---------+--------------+------+-----+---------------------+-------+
mysql> 7 rows in set (0.00 sec)

mysql> select unix_timestamp(date) from intraday_PAR where symbole='1rpfte' order by
> date;
mysql> +----------------------+
mysql> | unix_timestamp(date) |
mysql> +----------------------+
mysql> |            941179740 |
mysql> |            941180400 |  <----------
mysql> |            941266860 |  <----------
mysql> |            941180520 |  <----------
mysql> |            941180580 |
mysql> |            941180640 |
mysql> |            941180700 |
mysql> |            941180760 |
mysql> |            941180820 |
mysql> |            941180880 |
mysql> |            941180940 |
mysql> |            941181000 |
mysql> |            941181060 |
mysql> |            941181120 |
mysql> |            941181180 |
mysql> |            941181240 |
mysql> |            941181300 |
mysql> |            941181360 |
mysql> |            941181420 |
mysql> |            941181480 |
mysql> |            941181540 |
mysql> |            941181600 |
mysql> |            941181660 |
mysql> |            941181720 |
mysql> |            941181780 |
mysql> |            941181840 |
mysql> |            941181900 |
mysql> |            941181960 |
mysql> |            941182020 |
........
mysql> 466 rows in set (0.00 sec)



  Regards,
  Alex.



Thread
Maybe a BUG in dates ordering ...BAUMEISTER Alexandre29 Oct
  • Re: Maybe a BUG in dates ordering ...sinisa29 Oct
    • Re[2]: Maybe a BUG in dates ordering ...BAUMEISTER Alexandre1 Nov
      • Re[2]: Maybe a BUG in dates ordering ...Michael Widenius26 Nov