johannes                                 Wed, 07 Sep 2011 13:33:56 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316350

Log:
- Use myslqnd by default when MySQL extensions are activated but no path given

Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/UPGRADING
    U   php/php-src/branches/PHP_5_4/ext/mysql/config.m4
    U   php/php-src/branches/PHP_5_4/ext/mysqli/config.m4
    U   php/php-src/branches/PHP_5_4/ext/pdo_mysql/config.m4
    U   php/php-src/trunk/ext/mysql/config.m4
    U   php/php-src/trunk/ext/mysqli/config.m4
    U   php/php-src/trunk/ext/pdo_mysql/config.m4

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/branches/PHP_5_4/NEWS	2011-09-07 13:33:56 UTC (rev 316350)
@@ -15,6 +15,9 @@
     sort functions (sort, rsort, ksort, krsort, asort, arsort and
     array_multisort). FR#55158 (Arpad)

+- Improved MySQL extensions:
+  . ext/mysql, mysqli and pdo_mysql now use mysqlnd by defalt. (Johannes)
+
 - Improved mbstring extension:
   . Added Shift_JIS/UTF-8 Emoji (pictograms) support. (Rui)
   . Added JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004)

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===================================================================
--- php/php-src/branches/PHP_5_4/UPGRADING	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/branches/PHP_5_4/UPGRADING	2011-09-07 13:33:56 UTC (rev 316350)
@@ -297,6 +297,9 @@

      c. with changed behaviour

+        - The MySQL extensions (ext/mysql, mysqli and PDO_mysql) use mysqlnd
+	  as defalt library now. It is still possible to use libmysql by
+	  specifying a path to the configure options.
         - The session extension now can hook into the file upload feature
           in order to provide upload progress information through session
           variables.

Modified: php/php-src/branches/PHP_5_4/ext/mysql/config.m4
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysql/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/branches/PHP_5_4/ext/mysql/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -41,8 +41,8 @@

 PHP_ARG_WITH(mysql, for MySQL support,
 [  --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
-                          directory.  If mysqlnd is passed as DIR,
-                          the MySQL native driver will be used [/usr/local]])
+                          directory, if no DIR is passed or the value is
+                          mysqlnd the MySQL native driver will be used])

 PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
 [  --with-mysql-sock[=DIR]   MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
@@ -53,7 +53,7 @@
   [  --with-zlib-dir[=DIR]     MySQL: Set the path to libz install prefix], no, no)
 fi

-if test "$PHP_MYSQL" = "mysqlnd"; then
+if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
   dnl enables build of mysqnd library
   PHP_MYSQLND_ENABLED=yes

@@ -61,17 +61,15 @@
   MYSQL_DIR=
   MYSQL_INC_DIR=

-  for i in $PHP_MYSQL /usr/local /usr; do
-    if test -r $i/include/mysql/mysql.h; then
-      MYSQL_DIR=$i
-      MYSQL_INC_DIR=$i/include/mysql
-      break
-    elif test -r $i/include/mysql.h; then
-      MYSQL_DIR=$i
-      MYSQL_INC_DIR=$i/include
-      break
-    fi
-  done
+  if test -r $PHP_MYSQL/include/mysql/mysql.h; then
+    MYSQL_DIR=$PHP_MYSQL
+    MYSQL_INC_DIR=$PHP_MYSQL/include/mysql
+    break
+  elif test -r $PHP_MYSQL/include/mysql.h; then
+    MYSQL_DIR=$PHP_MYSQL
+    MYSQL_INC_DIR=$PHP_MYSQL/include
+    break
+  fi

   if test -z "$MYSQL_DIR"; then
     AC_MSG_ERROR([Cannot find MySQL header files under $PHP_MYSQL.
@@ -155,7 +153,7 @@
   PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
   PHP_SUBST(MYSQL_SHARED_LIBADD)

-  if test "$PHP_MYSQL" = "mysqlnd"; then
+  if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
     PHP_ADD_EXTENSION_DEP(mysql, mysqlnd)
     AC_DEFINE([MYSQL_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
   fi

Modified: php/php-src/branches/PHP_5_4/ext/mysqli/config.m4
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqli/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -4,24 +4,20 @@

 PHP_ARG_WITH(mysqli, for MySQLi support,
 [  --with-mysqli[=FILE]    Include MySQLi support.  FILE is the path
-                          to mysql_config.  If mysqlnd is passed as FILE,
-                          the MySQL native driver will be used [mysql_config]])
+                          to mysql_config.  If no value or mysqlnd is passed
+                          as FILE, the MySQL native driver will be used])

 PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,
 [  --enable-embedded-mysqli  MYSQLi: Enable embedded support
                             Note: Does not work with MySQL native driver!], no, no)

-if test "$PHP_MYSQLI" = "mysqlnd"; then
+if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
   dnl This needs to be set in any extension which wishes to use mysqlnd
   PHP_MYSQLND_ENABLED=yes

 elif test "$PHP_MYSQLI" != "no"; then

-  if test "$PHP_MYSQLI" = "yes"; then
-    MYSQL_CONFIG=`$php_shtool path mysql_config`
-  else
-    MYSQL_CONFIG=$PHP_MYSQLI
-  fi
+  MYSQL_CONFIG=$PHP_MYSQLI

   MYSQL_LIB_NAME='mysqlclient'
   if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
@@ -82,7 +78,7 @@
   PHP_SUBST(MYSQLI_SHARED_LIBADD)
   PHP_INSTALL_HEADERS([ext/mysqli/php_mysqli_structs.h])

-  if test "$PHP_MYSQLI" = "mysqlnd"; then
+  if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
     PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
     AC_DEFINE([MYSQLI_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
   fi

Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/config.m4
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_mysql/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -4,8 +4,8 @@

 PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO,
 [  --with-pdo-mysql[=DIR]    PDO: MySQL support. DIR is the MySQL base directory
-                                 If mysqlnd is passed as DIR, the MySQL native
-                                 native driver will be used [/usr/local]])
+                                 If no value or mysqlnd is passed as DIR, the
+                                 MySQL native driver will be used])

 if test -z "$PHP_ZLIB_DIR"; then
   PHP_ARG_WITH(zlib-dir, for the location of libz,
@@ -28,30 +28,21 @@
     done
   ])

-  if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
-    PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
-  elif test "$PHP_PDO_MYSQL" != "yes"; then
-    if test -d "$PHP_PDO_MYSQL" ; then
-      if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
-        PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
-      else
-        PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+  if test "$PHP_PDO_MYSQL" != "yes" && test "$PHP_PDO_MYSQL" != "mysqlnd"; then
+    if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
+      PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
+    else
+      if test -d "$PHP_PDO_MYSQL" ; then
+        if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
+          PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
+        else
+          PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+        fi
       fi
     fi
-  else
-    for i in /usr/local /usr ; do
-      if test -x "$i/bin/mysql_config" ; then
-        PDO_MYSQL_CONFIG="$i/bin/mysql_config"
-        break;
-      fi
-      if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
-        PDO_MYSQL_DIR="$i"
-        break;
-      fi
-    done
   fi
-
-  if test "$PHP_PDO_MYSQL" = "mysqlnd"; then
+
+  if test "$PHP_PDO_MYSQL" = "yes" || test "$PHP_PDO_MYSQL" = "mysqlnd"; then
     dnl enables build of mysqnd library
     PHP_MYSQLND_ENABLED=yes
     AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])

Modified: php/php-src/trunk/ext/mysql/config.m4
===================================================================
--- php/php-src/trunk/ext/mysql/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/trunk/ext/mysql/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -41,8 +41,8 @@

 PHP_ARG_WITH(mysql, for MySQL support,
 [  --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
-                          directory.  If mysqlnd is passed as DIR,
-                          the MySQL native driver will be used [/usr/local]])
+                          directory, if no DIR is passed or the value is
+                          mysqlnd the MySQL native driver will be used])

 PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
 [  --with-mysql-sock[=DIR]   MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
@@ -53,7 +53,7 @@
   [  --with-zlib-dir[=DIR]     MySQL: Set the path to libz install prefix], no, no)
 fi

-if test "$PHP_MYSQL" = "mysqlnd"; then
+if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
   dnl enables build of mysqnd library
   PHP_MYSQLND_ENABLED=yes

@@ -61,17 +61,15 @@
   MYSQL_DIR=
   MYSQL_INC_DIR=

-  for i in $PHP_MYSQL /usr/local /usr; do
-    if test -r $i/include/mysql/mysql.h; then
-      MYSQL_DIR=$i
-      MYSQL_INC_DIR=$i/include/mysql
-      break
-    elif test -r $i/include/mysql.h; then
-      MYSQL_DIR=$i
-      MYSQL_INC_DIR=$i/include
-      break
-    fi
-  done
+  if test -r $PHP_MYSQL/include/mysql/mysql.h; then
+    MYSQL_DIR=$PHP_MYSQL
+    MYSQL_INC_DIR=$PHP_MYSQL/include/mysql
+    break
+  elif test -r $PHP_MYSQL/include/mysql.h; then
+    MYSQL_DIR=$PHP_MYSQL
+    MYSQL_INC_DIR=$PHP_MYSQL/include
+    break
+  fi

   if test -z "$MYSQL_DIR"; then
     AC_MSG_ERROR([Cannot find MySQL header files under $PHP_MYSQL.
@@ -155,7 +153,7 @@
   PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
   PHP_SUBST(MYSQL_SHARED_LIBADD)

-  if test "$PHP_MYSQL" = "mysqlnd"; then
+  if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
     PHP_ADD_EXTENSION_DEP(mysql, mysqlnd)
     AC_DEFINE([MYSQL_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
   fi

Modified: php/php-src/trunk/ext/mysqli/config.m4
===================================================================
--- php/php-src/trunk/ext/mysqli/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/trunk/ext/mysqli/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -4,24 +4,20 @@

 PHP_ARG_WITH(mysqli, for MySQLi support,
 [  --with-mysqli[=FILE]    Include MySQLi support.  FILE is the path
-                          to mysql_config.  If mysqlnd is passed as FILE,
-                          the MySQL native driver will be used [mysql_config]])
+                          to mysql_config.  If no value or mysqlnd is passed
+                          as FILE, the MySQL native driver will be used])

 PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,
 [  --enable-embedded-mysqli  MYSQLi: Enable embedded support
                             Note: Does not work with MySQL native driver!], no, no)

-if test "$PHP_MYSQLI" = "mysqlnd"; then
+if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
   dnl This needs to be set in any extension which wishes to use mysqlnd
   PHP_MYSQLND_ENABLED=yes

 elif test "$PHP_MYSQLI" != "no"; then

-  if test "$PHP_MYSQLI" = "yes"; then
-    MYSQL_CONFIG=`$php_shtool path mysql_config`
-  else
-    MYSQL_CONFIG=$PHP_MYSQLI
-  fi
+  MYSQL_CONFIG=$PHP_MYSQLI

   MYSQL_LIB_NAME='mysqlclient'
   if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
@@ -82,7 +78,7 @@
   PHP_SUBST(MYSQLI_SHARED_LIBADD)
   PHP_INSTALL_HEADERS([ext/mysqli/php_mysqli_structs.h])

-  if test "$PHP_MYSQLI" = "mysqlnd"; then
+  if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
     PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
     AC_DEFINE([MYSQLI_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
   fi

Modified: php/php-src/trunk/ext/pdo_mysql/config.m4
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/config.m4	2011-09-07 12:59:04 UTC (rev 316349)
+++ php/php-src/trunk/ext/pdo_mysql/config.m4	2011-09-07 13:33:56 UTC (rev 316350)
@@ -4,8 +4,8 @@

 PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO,
 [  --with-pdo-mysql[=DIR]    PDO: MySQL support. DIR is the MySQL base directory
-                                 If mysqlnd is passed as DIR, the MySQL native
-                                 native driver will be used [/usr/local]])
+                                 If no value or mysqlnd is passed as DIR, the
+                                 MySQL native driver will be used])

 if test -z "$PHP_ZLIB_DIR"; then
   PHP_ARG_WITH(zlib-dir, for the location of libz,
@@ -28,30 +28,21 @@
     done
   ])

-  if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
-    PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
-  elif test "$PHP_PDO_MYSQL" != "yes"; then
-    if test -d "$PHP_PDO_MYSQL" ; then
-      if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
-        PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
-      else
-        PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+  if test "$PHP_PDO_MYSQL" != "yes" && test "$PHP_PDO_MYSQL" != "mysqlnd"; then
+    if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
+      PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
+    else
+      if test -d "$PHP_PDO_MYSQL" ; then
+        if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
+          PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
+        else
+          PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+        fi
       fi
     fi
-  else
-    for i in /usr/local /usr ; do
-      if test -x "$i/bin/mysql_config" ; then
-        PDO_MYSQL_CONFIG="$i/bin/mysql_config"
-        break;
-      fi
-      if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
-        PDO_MYSQL_DIR="$i"
-        break;
-      fi
-    done
   fi
-
-  if test "$PHP_PDO_MYSQL" = "mysqlnd"; then
+
+  if test "$PHP_PDO_MYSQL" = "yes" || test "$PHP_PDO_MYSQL" = "mysqlnd"; then
     dnl enables build of mysqnd library
     PHP_MYSQLND_ENABLED=yes
     AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to