MySQL Forums
Forum List  »  Quality Assurance

is this a bug?
Posted by: Yuri Niyazov
Date: April 10, 2007 01:18AM

Hello. I am running MySQL 5.0.37-community on Windows XP with the MyISAM engine. I am experiencing the following strange behavior. I have a table on which I do some statistical manipulation through a large query. The first time I execute that query, some of the values on the resultSet come out as NULL. Without modifying anything in the table, I re-execute the query, and now all the values in the resultSet come out as I expect them to. They continue to come out correctly until I exit the client and reconnect, at which point the first time I execute the query, some of the values are NULL again, and afterwards everything is fine yet again.

Since this forum doesn't allow posting of file attachments (or at least, I can't see a button that says "upload"), I uploaded the data and the query to my geocities home page:

http://www.geocities.com/yuricake/mysql-bug.zip

within that file, create.sql recreates the table that I have on my machine, and get-data.sql executes the offending query twice.

The copy of the output is below:

+----+----+---+
| lr | rr | u |
+----+----+---+
| 1 | 4 | 2 |
| 5 | 2 | 2 |
| 2 | 5 | 2 |
| 4 | 1 | 2 |
+----+----+---+
+-------------+-------------+-------------+------+--------------+--------------+-------+-------+
| m_l | m_r | m_p | p_m | m_s_l | m_s_r | s_m_l | s_m_r |
+-------------+-------------+-------------+------+--------------+--------------+-------+-------+
| 3.000000000 | 3.000000000 | 7.000000000 | NULL | 11.500000000 | 11.500000000 | NULL | NULL |
+-------------+-------------+-------------+------+--------------+--------------+-------+-------+
+-------------+-------------+-------------+----------------------------------+--------------+--------------+----------------------------------+----------------------------------+
| m_l | m_r | m_p | p_m | m_s_l | m_s_r | s_m_l | s_m_r |
+-------------+-------------+-------------+----------------------------------+--------------+--------------+----------------------------------+----------------------------------+
| 3.000000000 | 3.000000000 | 7.000000000 | 9.000000000000000000000000000000 | 11.500000000 | 11.500000000 | 9.000000000000000000000000000000 | 9.000000000000000000000000000000 |
+-------------+-------------+-------------+----------------------------------+--------------+--------------+----------------------------------+----------------------------------+

Options: ReplyQuote


Subject
Views
Written By
Posted
is this a bug?
4431
April 10, 2007 01:18AM
2892
April 10, 2007 04:08AM
2984
April 10, 2007 12:05PM
3071
April 11, 2007 02:56AM
4277
April 16, 2007 09:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.