Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

PHP mysqlnd svn commit: r835 - in trunk: php5/ext/mysql php5/ext/mysqli php6/ext/mysqli

From: <ahristov(at)mysql.com>
Date: Mon Jul 23 2007 - 12:50:43 EDT


Author: ahristov
Date: 2007-07-23 18:50:43 +0200 (Mon, 23 Jul 2007) New Revision: 835

Modified:

   trunk/php5/ext/mysql/php_mysql.c
   trunk/php5/ext/mysqli/config9.m4
   trunk/php5/ext/mysqli/mysqli_api.c
   trunk/php5/ext/mysqli/mysqli_nonapi.c
   trunk/php6/ext/mysqli/config9.m4
   trunk/php6/ext/mysqli/mysqli_api.c
   trunk/php6/ext/mysqli/mysqli_nonapi.c
Log:
Merged code from cvs.php.net

Modified: trunk/php5/ext/mysql/php_mysql.c


  • trunk/php5/ext/mysql/php_mysql.c 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php5/ext/mysql/php_mysql.c 2007-07-23 16:50:43 UTC (rev 835)
    @@ -33,6 +33,7 @@
    #include "php_globals.h" #include "ext/standard/info.h" #include "ext/standard/php_string.h" +#include "ext/standard/basic_functions.h"

 #ifdef ZEND_ENGINE_2
 # include "zend_exceptions.h"

Modified: trunk/php5/ext/mysqli/config9.m4


  • trunk/php5/ext/mysqli/config9.m4 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php5/ext/mysqli/config9.m4 2007-07-23 16:50:43 UTC (rev 835)
    @@ -4,7 +4,7 @@

 PHP_ARG_WITH(mysqli, for MySQLi support, -[ --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname to mysql_config. +[ --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname to mysql_config [mysql_config].

                           If mysqlnd is passed as FILE, the MySQL native driver will be used])
 

 PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,

Modified: trunk/php5/ext/mysqli/mysqli_api.c


  • trunk/php5/ext/mysqli/mysqli_api.c 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php5/ext/mysqli/mysqli_api.c 2007-07-23 16:50:43 UTC (rev 835)
    @@ -1593,6 +1593,9 @@
    if (!socket_len) { socket = NULL; } + if (!socket) { + socket = MyG(default_socket); + } if (!passwd) { passwd = MyG(default_pw); passwd_len = strlen(passwd);
    @@ -1607,8 +1610,8 @@
    MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED);
 	/* remove some insecure options */
-	flags ^= CLIENT_MULTI_STATEMENTS;   /* don't allow multi_queries via connect parameter */
-	if (PG(open_basedir) && strlen(PG(open_basedir))) {
+	flags &= ~CLIENT_MULTI_STATEMENTS;   /* don't allow multi_queries via connect parameter */
+	if (PG(open_basedir) && PG(open_basedir)[0] != '\0') {
 		flags ^= CLIENT_LOCAL_FILES;
 	}
 
Do you need help?X

Modified: trunk/php5/ext/mysqli/mysqli_nonapi.c


  • trunk/php5/ext/mysqli/mysqli_nonapi.c 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php5/ext/mysqli/mysqli_nonapi.c 2007-07-23 16:50:43 UTC (rev 835)
    @@ -58,7 +58,7 @@
    return; }
    • if (!socket_len) { + if (!socket_len || !socket) { socket = MyG(default_socket); }

Modified: trunk/php6/ext/mysqli/config9.m4


  • trunk/php6/ext/mysqli/config9.m4 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php6/ext/mysqli/config9.m4 2007-07-23 16:50:43 UTC (rev 835)
    @@ -3,7 +3,7 @@
    dnl config.m4 for extension mysqli

 PHP_ARG_WITH(mysqli, for MySQLi support, -[ --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname to mysql_config. +[ --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname to mysql_config [mysql_config].

                           If mysqlnd is passed as FILE, the MySQL native driver will be used])
 

 PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,

Modified: trunk/php6/ext/mysqli/mysqli_api.c


  • trunk/php6/ext/mysqli/mysqli_api.c 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php6/ext/mysqli/mysqli_api.c 2007-07-23 16:50:43 UTC (rev 835)
    @@ -1522,6 +1522,12 @@
    } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED);
+	if (PG(open_basedir) && PG(open_basedir)[0] != '\0') {
+		if(mysql_option == MYSQL_OPT_LOCAL_INFILE) {
+			RETURN_FALSE;
+		}
+	}
+
 	switch (Z_TYPE_PP(&mysql_value)) {
 		case IS_UNICODE:
 			zval_unicode_to_string(mysql_value TSRMLS_CC);

@@ -1656,6 +1662,9 @@
if (!socket_len) { socket = NULL; } + if (!socket) { + socket = MyG(default_socket); + } if (!passwd) { passwd = MyG(default_pw); passwd_len = strlen(passwd);
@@ -1670,8 +1679,8 @@
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); /* remove some insecure options */ - flags ^= CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ - if (PG(open_basedir) && strlen(PG(open_basedir))) { + flags &= ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ + if (PG(open_basedir) && PG(open_basedir)[0] != '\0') { flags ^= CLIENT_LOCAL_FILES; }
@@ -2279,7 +2288,7 @@
double - but this is a known problem of the simple MySQL API ;)
Do you need more help?X
*/ int i = 0;

-
+
 		for (i = mysql_stmt_field_count(stmt->stmt) - 1; i >=0; --i) {
 			if (stmt->stmt->fields && stmt->stmt->fields[i].type == MYSQL_TYPE_BLOB) {
 				my_bool	tmp=1;

Modified: trunk/php6/ext/mysqli/mysqli_nonapi.c


  • trunk/php6/ext/mysqli/mysqli_nonapi.c 2007-07-23 14:38:49 UTC (rev 834) +++ trunk/php6/ext/mysqli/mysqli_nonapi.c 2007-07-23 16:50:43 UTC (rev 835)
    @@ -62,7 +62,7 @@
    return; }
    • if (!socket_len) { + if (!socket_len || !socket) { socket = MyG(default_socket); }
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Mon Jul 23 12:52:59 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:11:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library