6 messages in com.mysql.lists.bugsLIMIT 0 hangs up in 4.0.1| From | Sent On | Attachments |
|---|---|---|
| Vladimir V. Kolpakov | 06 Feb 2002 02:29 | |
| Vladimir V. Kolpakov | 06 Feb 2002 02:29 | |
| Michael Widenius | 06 Feb 2002 06:48 | |
| Vladimir V. Kolpakov | 07 Feb 2002 00:37 | |
| Sasha Pachev | 07 Feb 2002 11:27 | |
| Michael Widenius | 08 Feb 2002 02:29 |
| Subject: | LIMIT 0 hangs up in 4.0.1![]() |
|---|---|
| From: | Michael Widenius (mon...@mysql.com) |
| Date: | 02/06/2002 06:48:05 AM |
| List: | com.mysql.lists.bugs |
Hi!
"Vladimir" == Vladimir V Kolpakov <w...@sfgate.com> writes:
Vladimir> Hi, Vladimir> It looks like "LIMIT 0" freeze SELECT against 4.0.1 server. Vladimir> I've checked out 4.0.2 changes list on mysql.com and seems to me Vladimir> it's not mentioned yet.
<cut>
Here is a patch for this (will be in 4.0.2).
===== sql_select.cc 1.149 vs edited ===== *** /tmp/sql_select.cc-1.149-17106 Thu Jan 31 04:36:58 2002 --- edited/sql_select.cc Wed Feb 6 18:18:19 2002 *************** *** 2929,2945 **** if (having && having->val_int() == 0) send_row=0; } ! if (!tables || !(result->send_fields(fields,1))) { ! if (send_row) ! result->send_data(fields); ! if (tables) // Not from do_select() { ! /* Close open cursors */ ! for (TABLE_LIST *table=tables; table ; table=table->next) ! table->table->file->index_end(); ! result->send_eof(); // Should be safe } } DBUG_RETURN(0); } --- 2929,2948 ---- if (having && having->val_int() == 0) send_row=0; } ! if (!tables) { ! if (!(result->send_fields(fields,1))) { ! if (send_row) ! result->send_data(fields); ! if (tables) // Not from do_select() ! { ! /* Close open cursors */ ! for (TABLE_LIST *table=tables; table ; table=table->next) ! table->table->file->index_end(); ! } } + result->send_eof(); // Should be safe } DBUG_RETURN(0); }
Regards, Monty




