List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:March 19 2001 7:27am
Subject:mysql_use_result() - some improvements required?
View as plain text  
Hi!

>>>>> "Paul" == Paul Cadach <paul@stripped> writes:

Paul> Hi,
Paul> As I understand mysql_store_result() differs from mysql_use_result() in
Paul> manner of fetching data from the network. First function fetches all records
Paul> selected by query into client's memory and then passes given array to other
Paul> API functions, while second function fetches records "on demand" (i.e. when
Paul> they requested by other client's API).

Paul> I'm interesting in next situation - when client doesn't want to fetch rest
Paul> of the selected records, it just calls mysql_free_result() function, which
Paul> frees allocated array after mysql_store_result() and fetches all records not
Paul> fetched before from the network.

Paul> Why do you think about adding "abort" code which can be sent to the server
Paul> from client to stop transmitting query results over the network?

The problem with an "abort code" is that the server is not reading
anything at all during sending. Adding reading for the abort code
should probably slow down the protocol a lot.

Another way to do this is to open another connection and send a 'kill'
command on the old query id.  If the abort is not done frequently,
this is a much more efficient solution.

Regards,
Monty
Thread
mysql_use_result() - some improvements required?Paul Cadach17 Mar
  • mysql_use_result() - some improvements required?Michael Widenius19 Mar