Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37918 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38651 invoked from network); 27 May 2008 13:21:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2008 13:21:05 -0000 Authentication-Results: pb1.pair.com header.from=andrey@mysql.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrey@mysql.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mysql.com from 64.212.38.36 cause and error) X-PHP-List-Original-Sender: andrey@mysql.com X-Host-Fingerprint: 64.212.38.36 mailgate-b.mysql.com Linux 2.6 Received: from [64.212.38.36] ([64.212.38.36:55160] helo=mailgate-b.mysql.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/77-28982-FBA0C384 for ; Tue, 27 May 2008 09:21:05 -0400 Received: from mail.mysql.com (mailsend.mysql.com [10.100.1.123]) by mailgate-b.mysql.com (8.13.8/8.13.8) with ESMTP id m4RDKwss022502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 15:20:58 +0200 Received: from [10.16.64.238] (gmp-ea-fw-1.sun.com [192.18.1.36]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id m4RDKqQX022496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 15:20:53 +0200 Message-ID: <483C0ABD.6050607@mysql.com> Date: Tue, 27 May 2008 15:21:01 +0200 User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Pierre Joye CC: Ulf Wendel , KishoreKumar Bairi , PHP Internals References: <483C0788.1020206@mysql.com> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL From: andrey@mysql.com (Andrey Hristov) Pierre Joye wrote: > hi Ulf, > > On Tue, May 27, 2008 at 3:07 PM, Ulf Wendel 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