Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23613 invoked by uid 1010); 10 Jun 2004 22:14:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23192 invoked from network); 10 Jun 2004 22:14:43 -0000 Received: from unknown (HELO prism.goldenbluellc.com) (66.125.174.141) by pb1.pair.com with SMTP; 10 Jun 2004 22:14:43 -0000 Received: from EPOX2 (unknown [192.168.0.5]) by prism.goldenbluellc.com (GoldenBlue MTA) with SMTP id BC8E1244C4 for ; Thu, 10 Jun 2004 15:14:42 -0700 (PDT) Message-ID: <013401c44f38$54aaf770$0500a8c0@EPOX2> To: References: <40C8D5C7.4070703@cschneid.com> <64363E53-BB28-11D8-BBAB-000393B2B3C0@omniti.com> Date: Thu, 10 Jun 2004 15:14:30 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_012C_01C44EFD.A0ECEA70" X-Priority: 3 X-MSMail-Priority: Normal Subject: Minor bugs in ext/mysql and ext/mysqli (patches attached) From: gavin@vess.com ("Gavin") ------=_NextPart_000_012C_01C44EFD.A0ECEA70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: "George Schlossnagle" > > very quickly. On the other hand I think the focus of people on this=20 > > list right now is a bit different from what you're trying to do: Fix = > > bugs in PHP 4 and get PHP 5 out of the door. On that note, I'd like to submit a couple patches for review. I'm tempted to also ask for a CVS account, as I occasionally find/fix = bugs in the course of working on a new SAPI I'm developing. = Additionally, a later version of my SAPI would benefit from zend_llist's = with additional support for sorted lists (e.g. insert into sorted list, = find from a sorted list, etc.), which I plan to add as a private patch, = unless adopted by the PHP team =3D). Pragmatically, my project does = not depend on adoption, so I might find it simpler to just submit the = patches to this list and let the winds carry them .. Problem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D MYSQL_UNIX_ADDR is defined in both php_config.h and MySQL's external = mysql_version.h. If --with-mysql-sock is used with PHP's configure = script to specify a location different than the location used when = compiling MySQL, then these defines are inconsistent. The mysql and mysqli extensions do not default to the socket specified = with --with-mysql-sock when mysql.default_path is not defined in the = phpini file. Instead, the mysql extension defaults to using whatever = was compiled into the MySQL library. Patches are attached for the mysql = extension of php-4.3.7, and both the mysql and mysqli extensions in = php-5.0.0RC3. What is accomplished by the patches? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D - fixes the compilation warning: "MYSQL_UNIX_ADDR" redefined - renamed PHP's conflicting use of 'MYSQL_UNIX_ADDR' to = 'PHP_MYSQL_UNIX_ADDR' - corrected the initialization of the global default_socket in = mysql/mysqi extension to properly support the default supplied via = --with-mysql-sock - provided backwardly-compatible default in the event that neither = --with-mysql-sock is used when compiling, nor a value is supplied for = mysql.default_socket in the phpini file. - selects default socket in the following priority: a) uses the value supplied to --with-mysql-sock=3D b) first socket found in the sequence of paths below: /var/run/mysqld/mysqld.sock \ /var/tmp/mysql.sock \ /var/run/mysql/mysql.sock \ /var/lib/mysql/mysql.sock \ /var/mysql/mysql.sock \ /usr/local/mysql/var/mysql.sock \ /Private/tmp/mysql.sock \ /private/tmp/mysql.sock \ /tmp/mysql.sock \ c) the default provided when MySQL was compiled (from mysql_version.h) Cheers, Gavin, nic@vess.com (do not use my trap address above) ------=_NextPart_000_012C_01C44EFD.A0ECEA70--