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 |
+-------------+-------------+-------------+----------------------------------+--------------+--------------+----------------------------------+----------------------------------+