andrey          Mon Jul 21 12:58:51 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/mysql  config.m4 php_mysql.c php_mysql_structs.h 
    /php-src/ext/mysqli mysqli.c php_mysqli_structs.h 
    /php-src/ext/pdo_mysql      config.m4 mysql_driver.c pdo_mysql.c 
                                php_pdo_mysql_int.h 
  Log:
  Fix for bug#45179 --with-mysql-sock fails to compile & work
  Now --with-mysql-sock controls all mysql extensions. If provided it will be
  the default value as it was set in php.ini . php.ini will override it for
  ext/mysql and ext/mysqli but not for pdo_mysql
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/config.m4?r1=1.67.2.1.2.1.2.3&r2=1.67.2.1.2.1.2.4&diff_format=u
Index: php-src/ext/mysql/config.m4
diff -u php-src/ext/mysql/config.m4:1.67.2.1.2.1.2.3 
php-src/ext/mysql/config.m4:1.67.2.1.2.1.2.4
--- php-src/ext/mysql/config.m4:1.67.2.1.2.1.2.3        Mon Mar 10 20:15:38 2008
+++ php-src/ext/mysql/config.m4 Mon Jul 21 12:58:51 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.67.2.1.2.1.2.3 2008/03/10 20:15:38 andrey Exp $
+dnl $Id: config.m4,v 1.67.2.1.2.1.2.4 2008/07/21 12:58:51 andrey Exp $
 dnl
 
 AC_DEFUN([MYSQL_LIB_CHK], [
@@ -31,7 +31,7 @@
   done
 
   if test -n "$MYSQL_SOCK"; then
-    AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
+    AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
     AC_MSG_RESULT([$MYSQL_SOCK])
   else
     AC_MSG_RESULT([no])
@@ -45,7 +45,7 @@
                           the MySQL native driver will be used [/usr/local]])
 
 PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
-[  --with-mysql-sock[=DIR]   MySQL: Location of the MySQL unix socket pointer.
+[  --with-mysql-sock[=DIR]   MySQL/MySQLi/PDO_MYSQL: Location of the MySQL 
unix socket pointer.
                             If unspecified, the default locations are 
searched], no, no)
 
 if test -z "$PHP_ZLIB_DIR"; then
@@ -62,7 +62,7 @@
   AC_MSG_CHECKING([for MySQL UNIX socket location])
   if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
     MYSQL_SOCK=$PHP_MYSQL_SOCK
-    AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
+    AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
     AC_MSG_RESULT([$MYSQL_SOCK])
   elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
     PHP_MYSQL_SOCKET_SEARCH
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.21&r2=1.213.2.6.2.16.2.22&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.21 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.22
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.21   Tue Jul 15 13:11:08 2008
+++ php-src/ext/mysql/php_mysql.c       Mon Jul 21 12:58:51 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.21 2008/07/15 13:11:08 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.22 2008/07/21 12:58:51 andrey Exp $ */
 
 /* TODO:
  *
@@ -397,7 +397,11 @@
        STD_PHP_INI_ENTRY("mysql.default_user",                 NULL,   
PHP_INI_ALL,            OnUpdateString,         default_user,           
zend_mysql_globals,             mysql_globals)
        STD_PHP_INI_ENTRY("mysql.default_password",             NULL,   
PHP_INI_ALL,            OnUpdateString,         default_password,       
zend_mysql_globals,             mysql_globals)
        PHP_INI_ENTRY("mysql.default_port",                             NULL,   
PHP_INI_ALL,            OnMySQLPort)
+#ifdef MYSQL_UNIX_ADDR
+       STD_PHP_INI_ENTRY("mysql.default_socket",               
MYSQL_UNIX_ADDR,PHP_INI_ALL,OnUpdateStringUnempty,      default_socket, 
zend_mysql_globals,             mysql_globals)
+#else
        STD_PHP_INI_ENTRY("mysql.default_socket",               NULL,   
PHP_INI_ALL,            OnUpdateStringUnempty,  default_socket, 
zend_mysql_globals,             mysql_globals)
+#endif
        STD_PHP_INI_ENTRY("mysql.connect_timeout",              "60",   
PHP_INI_ALL,            OnUpdateLong,           connect_timeout,        
zend_mysql_globals,             mysql_globals)
        STD_PHP_INI_BOOLEAN("mysql.trace_mode",                 "0",    
PHP_INI_ALL,            OnUpdateLong,           trace_mode,             
zend_mysql_globals,             mysql_globals)
        STD_PHP_INI_BOOLEAN("mysql.allow_local_infile", "1",    PHP_INI_SYSTEM, 
        OnUpdateLong,           allow_local_infile, zend_mysql_globals,         
mysql_globals)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql_structs.h?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: php-src/ext/mysql/php_mysql_structs.h
diff -u php-src/ext/mysql/php_mysql_structs.h:1.1.2.4 
php-src/ext/mysql/php_mysql_structs.h:1.1.2.5
--- php-src/ext/mysql/php_mysql_structs.h:1.1.2.4       Mon Mar 10 20:15:38 2008
+++ php-src/ext/mysql/php_mysql_structs.h       Mon Jul 21 12:58:51 2008
@@ -18,7 +18,7 @@
 */
 
 
-/* $Id: php_mysql_structs.h,v 1.1.2.4 2008/03/10 20:15:38 andrey Exp $ */
+/* $Id: php_mysql_structs.h,v 1.1.2.5 2008/07/21 12:58:51 andrey Exp $ */
 
 #ifndef PHP_MYSQL_STRUCTS_H
 #define PHP_MYSQL_STRUCTS_H
@@ -42,6 +42,13 @@
 #include <mysql.h>
 #endif
 
+#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+#ifdef MYSQL_UNIX_ADDR
+#undef MYSQL_UNIX_ADDR
+#endif
+#define MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR
+#endif
+
 #if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 50000) || 
MYSQL_VERSION_ID >= 50007 || MYSQL_USE_MYSQLND
 #define MYSQL_HAS_SET_CHARSET
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.17.2.27&r2=1.72.2.16.2.17.2.28&diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.27 
php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.28
--- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.27     Tue Jul 15 13:11:09 2008
+++ php-src/ext/mysqli/mysqli.c Mon Jul 21 12:58:51 2008
@@ -17,7 +17,7 @@
   |          Ulf Wendel <[EMAIL PROTECTED]>                                    
 |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli.c,v 1.72.2.16.2.17.2.27 2008/07/15 13:11:09 andrey Exp $ 
+  $Id: mysqli.c,v 1.72.2.16.2.17.2.28 2008/07/21 12:58:51 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -638,7 +638,11 @@
        STD_PHP_INI_ENTRY("mysqli.default_user",                        NULL,   
PHP_INI_ALL,            OnUpdateString,         default_user,           
zend_mysqli_globals,            mysqli_globals)
        STD_PHP_INI_ENTRY("mysqli.default_pw",                          NULL,   
PHP_INI_ALL,            OnUpdateString,         default_pw,                     
zend_mysqli_globals,            mysqli_globals)
        STD_PHP_INI_ENTRY("mysqli.default_port",                        "3306", 
PHP_INI_ALL,            OnUpdateLong,           default_port,           
zend_mysqli_globals,            mysqli_globals)
+#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+       STD_PHP_INI_ENTRY("mysqli.default_socket",                      
MYSQL_UNIX_ADDR,PHP_INI_ALL,OnUpdateStringUnempty,      default_socket, 
zend_mysqli_globals,            mysqli_globals)
+#else
        STD_PHP_INI_ENTRY("mysqli.default_socket",                      NULL,   
PHP_INI_ALL,            OnUpdateStringUnempty,  default_socket, 
zend_mysqli_globals,            mysqli_globals)
+#endif
        STD_PHP_INI_BOOLEAN("mysqli.reconnect",                         "0",    
PHP_INI_SYSTEM,         OnUpdateLong,           reconnect,                      
zend_mysqli_globals,            mysqli_globals)
        STD_PHP_INI_BOOLEAN("mysqli.allow_local_infile",        "1",    
PHP_INI_SYSTEM,         OnUpdateLong,           allow_local_infile,     
zend_mysqli_globals,            mysqli_globals)
 #ifdef MYSQLI_USE_MYSQLND
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/php_mysqli_structs.h?r1=1.4.2.14&r2=1.4.2.15&diff_format=u
Index: php-src/ext/mysqli/php_mysqli_structs.h
diff -u php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.14 
php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.15
--- php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.14    Thu Apr 24 14:22:19 2008
+++ php-src/ext/mysqli/php_mysqli_structs.h     Mon Jul 21 12:58:51 2008
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: php_mysqli_structs.h,v 1.4.2.14 2008/04/24 14:22:19 andrey Exp $ 
+  $Id: php_mysqli_structs.h,v 1.4.2.15 2008/07/21 12:58:51 andrey Exp $ 
 */
 
 #ifndef PHP_MYSQLI_STRUCTS_H
@@ -45,6 +45,13 @@
 #include "mysqli_libmysql.h"
 #endif
 
+#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+#ifdef MYSQL_UNIX_ADDR
+#undef MYSQL_UNIX_ADDR
+#endif
+#define MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR
+#endif
+
 #include "php_mysqli.h"
 
 /* character set support */
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/config.m4?r1=1.25.2.7.2.6&r2=1.25.2.7.2.6.2.1&diff_format=u
Index: php-src/ext/pdo_mysql/config.m4
diff -u php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.6 
php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.6.2.1
--- php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.6        Tue Jul 31 13:02:00 2007
+++ php-src/ext/pdo_mysql/config.m4     Mon Jul 21 12:58:51 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.25.2.7.2.6 2007/07/31 13:02:00 jani Exp $
+dnl $Id: config.m4,v 1.25.2.7.2.6.2.1 2008/07/21 12:58:51 andrey Exp $
 dnl
 
 if test "$PHP_PDO" != "no"; then
@@ -96,8 +96,12 @@
     PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
   fi
 
-  AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
 
+  if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
+    AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PHP_MYSQL_SOCK", [ ])  
+  else
+    AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
+  fi
 
   PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query,
   [
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.59.2.13.2.5.2.1&r2=1.59.2.13.2.5.2.2&diff_format=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.1 
php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.2
--- php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.13.2.5.2.1      Mon Dec 31 
07:17:12 2007
+++ php-src/ext/pdo_mysql/mysql_driver.c        Mon Jul 21 12:58:51 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysql_driver.c,v 1.59.2.13.2.5.2.1 2007/12/31 07:17:12 sebastian Exp $ 
*/
+/* $Id: mysql_driver.c,v 1.59.2.13.2.5.2.2 2008/07/21 12:58:51 andrey Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -423,13 +423,6 @@
        pdo_mysql_check_liveness
 };
 
-#ifndef PDO_MYSQL_UNIX_ADDR
-# ifdef PHP_WIN32
-#  define PDO_MYSQL_UNIX_ADDR  "MySQL"
-# else
-#  define PDO_MYSQL_UNIX_ADDR  "/tmp/mysql.sock"
-# endif
-#endif
 
 static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options 
TSRMLS_DC) /* {{{ */
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/pdo_mysql.c?r1=1.8.2.13.2.1.2.2&r2=1.8.2.13.2.1.2.3&diff_format=u
Index: php-src/ext/pdo_mysql/pdo_mysql.c
diff -u php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.2 
php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.3
--- php-src/ext/pdo_mysql/pdo_mysql.c:1.8.2.13.2.1.2.2  Mon Dec 31 07:17:12 2007
+++ php-src/ext/pdo_mysql/pdo_mysql.c   Mon Jul 21 12:58:51 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_mysql.c,v 1.8.2.13.2.1.2.2 2007/12/31 07:17:12 sebastian Exp $ */
+/* $Id: pdo_mysql.c,v 1.8.2.13.2.1.2.3 2008/07/21 12:58:51 andrey Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -102,6 +102,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "PDO Driver for MySQL, client library 
version", mysql_get_client_info());
+       php_info_print_table_row(2, "MYSQL_SOCKET", PDO_MYSQL_UNIX_ADDR);
        php_info_print_table_end();
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/php_pdo_mysql_int.h?r1=1.16.2.4.2.1.2.1&r2=1.16.2.4.2.1.2.2&diff_format=u
Index: php-src/ext/pdo_mysql/php_pdo_mysql_int.h
diff -u php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.1 
php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.2
--- php-src/ext/pdo_mysql/php_pdo_mysql_int.h:1.16.2.4.2.1.2.1  Mon Dec 31 
07:17:12 2007
+++ php-src/ext/pdo_mysql/php_pdo_mysql_int.h   Mon Jul 21 12:58:51 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.1.2.1 2007/12/31 07:17:12 sebastian 
Exp $ */
+/* $Id: php_pdo_mysql_int.h,v 1.16.2.4.2.1.2.2 2008/07/21 12:58:51 andrey Exp 
$ */
 
 #ifndef PHP_PDO_MYSQL_INT_H
 #define PHP_PDO_MYSQL_INT_H
@@ -87,4 +87,13 @@
        PDO_MYSQL_ATTR_MAX_BUFFER_SIZE,
        PDO_MYSQL_ATTR_DIRECT_QUERY,
 };
+
+#ifndef PDO_MYSQL_UNIX_ADDR
+# ifdef PHP_WIN32
+#  define PDO_MYSQL_UNIX_ADDR  "MySQL"
+# else
+#  define PDO_MYSQL_UNIX_ADDR  "/tmp/mysql.sock"
+# endif
+#endif
+
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to