Weird SELECT bug in 5.0.21

2006-08-31 Thread Renald Buter
Hello list, I've found this strange select bug in retrieving rows from a table. I can best illustrate this with an output of two queries: mysql select id,jn from paper_2001 limit 10; +--+---+ | id | jn| +--+---+ | 19360350 | 6165 | | 19360351 | 6165 | |

Re: Weird SELECT bug in 5.0.21

2006-08-31 Thread Renald Buter
On 11:34 Thu 31 Aug , Renato Golin wrote: Renald Buter wrote: Odd, eh? But what's worse, the JOIN between this column and other columns *also* uses this truncated values and the result is bogus. I wouldn't say odd, as you didn't specified any order I wouldn't rely on the order

SOLVED (was: Weird SELECT bug in 5.0.21)

2006-08-31 Thread Renald Buter
On 12:27 Thu 31 Aug , Duncan Hill wrote: On Thursday 31 August 2006 12:21, Renald Buter wrote: The problem is that a simple 1-table query shows different answers depending on whether you select 1 or 2 columns. *blush* Of course. I see. How stupid. Thanks and sorry to have bothered

mysql_use_result issue: useless iterating over unused results

2005-01-11 Thread Renald Buter
Hello list, I am having this issue with mysql_use_result: it seems it will iterate over all unused results if I call 'mysql_free_result'. The following code illustrates this: mysql_query(mysql,SELECT * FROM a_very_large_table); res = mysql_use_result(mysql); i = 0; while (row =

mysql_use_result issue: useless iterating over unused results

2005-01-11 Thread Renald Buter
Hello list, I am having this issue with mysql_use_result: it seems it will iterate over all unused results if I call 'mysql_free_result'. The following code illustrates this: mysql_query(mysql,SELECT * FROM a_very_large_table); res = mysql_use_result(mysql); i = 0; while (row =

Re: mysql_use_result issue: useless iterating over unused results

2005-01-11 Thread Renald Buter
On 01:55 Tue 11 Jan , Karam Chand wrote: Yup. This is a normal behaviour. mysql_free_result() will result in bringing each unasked rows to the client and freeing it up row by row. This sounds to me as a useless feature. What could be the reason for such wasting behaviour? BTW, why

Re: A concat_grouped implementation example

2003-01-17 Thread Renald Buter
Linux 8.0 3.2-7) On Thu, 2003-01-16 at 15:42, Renald Buter wrote: Hai there, I have created a concat_grouped implementation as a mysql function. And I thought it might interest other users too. No guarantees here, but you might

A concat_grouped implementation example

2003-01-16 Thread Renald Buter
Hai there, I have created a concat_grouped implementation as a mysql function. And I thought it might interest other users too. No guarantees here, but you might learn from it. Find it at www.cwts.nl/buter/misc.html Regards, Renald