Re: Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL

From: Date: Tue, 27 May 2008 13:21:01 +0000
Subject: Re: Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-37918@lists.php.net to get a copy of this message
Pierre Joye wrote:
hi Ulf, On Tue, May 27, 2008 at 3:07 PM, Ulf Wendel <uwendel@mysql.com> wrote:
PHP streams are a better choice than PHP strings for handling large string objects. PHP strings are loaded into memory at once. For a streaming engine you do not want to load large portions of data into memory unless you really have to. Why does this function return a resource? What type of resource is it and what is the resource handle used for?
2. string mysqli_put_blob ( mysqli link, string file_path, string mode , int length ) file_path: is the path of the file which is to be stored in a blob field. mode: mode specifier if the file should be read ASCII mode or binary mode.
PHP strings are binary safe. There are no ASCII mode strings. Why do you want to distinguish between ASCII and binary strings? Why is the functionality restricted to existing files? Looks a bit like its inspired by ftp or Windows?
That's partaially incorrect. PHP streams are not always binary safe by default, at least on windows (linux has no 'b' but for API compatibility reasons afair). Unless you specify the binary mode explicitly. A common problem is to run under cgi, cli or apache on windows, the default mode may differ (apache for example is/was not binary safe)
Sorry, forgot about the UOS (Unreal OS :) Anyway, a blob is a blob, binary large object data, so binary should be enforced. Andrey -- Andrey Hristov, Connectors Software Developer, Database Group Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering

« previous php.internals (#37918) next »