How to make a thread-safe client 2007-01-26 The client library is almost\" thread-safe. The biggest problem is that the subroutines in
`net.c\' that read from sockets are not interrupt-safe. This was done with the thought that
you might want to have your own alarm that can break a long read to a server. If you install
an interrupt handlers for the SIGPIPE interrupt, the socket handling should be thread safe.
In the older binaries we distribute on our web site, the client libraries are not normally
compiled with the thread safe option (the windows binaries are however by default compiled
to be thread safe). Newer binary distributions should however have both a normal and a
threadsafe client library. Description 2007-01-25 Returns the number of rows aected (changed) by the last UPDATE, DELETE or INSERT query.
May be called immediately after mysql_query() for UPDATE, DELETE or INSERT statements.
For SELECT statements, mysql_affected_rows() works like mysql_num_rows().
mysql_affected_rows() is currently implemented as a macro. MySQL client tools 2007-01-24 The two retrieval mechanisms are complementary. Client programs should choose the approach
that is most appropriate for their requirements. In practice, clients tend to use
mysql_store_result() more commonly.
An advantage of mysql_store_result() is that because the rows have all been fetched
to the client, you not only can access rows sequentially, you can move back and forth
in the result set using mysql_data_seek() or mysql_row_seek() to change the current
row position within the result set. You can also nd out how many rows there are by
calling mysql_num_rows(). On the other hand, the memory requirements for mysql_store_
result() may be very high for large result sets and you are more likely to encounter
out-of-memory conditions. MySQL Perl API 2007-01-02 This section documents the Perl DBI interface. The former interface was called mysqlperl.
DBI/DBD now is the recommended Perl interface, so mysqlperl is obsolete and is not documented
here.
UP |