List:Commits« Previous MessageNext Message »
From:ahristov Date:June 28 2007 11:32am
Subject:PHP mysqlnd svn commit: r559 - in trunk: mysqlnd php4/ext/mysql php5/ext/mysql php6/ext/mysql
View as plain text  
Author: ahristov
Date: 2007-06-28 13:32:50 +0200 (Thu, 28 Jun 2007)
New Revision: 559

Modified:
   trunk/mysqlnd/mysqlnd.c
   trunk/php4/ext/mysql/php_mysql.c
   trunk/php5/ext/mysql/php_mysql.c
   trunk/php6/ext/mysql/php_mysql.c
Log:
Fix crashes.

Make error message better.


Modified: trunk/mysqlnd/mysqlnd.c
===================================================================
--- trunk/mysqlnd/mysqlnd.c	2007-06-28 11:26:49 UTC (rev 558)
+++ trunk/mysqlnd/mysqlnd.c	2007-06-28 11:32:50 UTC (rev 559)
@@ -538,8 +538,8 @@
 
 	if (FAIL == PACKET_READ_ALLOCA(ok_packet, conn) || ok_packet.field_count >= 0xFE) {
 		if (ok_packet.field_count == 0xFE) {
-			/* pre41 server !*/
-			php_error_docref(NULL TSRMLS_CC, E_WARNING, "mysqlnd cannot connect to MySQL < 4.1
servers");
+			/* old authentication with new server  !*/
+			php_error_docref(NULL TSRMLS_CC, E_WARNING, "mysqlnd cannot connect to MySQL 4.1+
using old authentication");
 		} else if (ok_packet.field_count == 0xFF) {
 			if (ok_packet.sqlstate[0]) {
 				if (!self_alloced) {

Modified: trunk/php4/ext/mysql/php_mysql.c
===================================================================
--- trunk/php4/ext/mysql/php_mysql.c	2007-06-28 11:26:49 UTC (rev 558)
+++ trunk/php4/ext/mysql/php_mysql.c	2007-06-28 11:32:50 UTC (rev 559)
@@ -2038,13 +2038,13 @@
 			break;
 	}
 
-#ifndef HAVE_MYSQLND
 	if ((result_type & MYSQL_BOTH) == 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either
MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH.");
 	}
 	
 	ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
+#ifndef HAVE_MYSQLND
 	if ((mysql_row=mysql_fetch_row(mysql_result))==NULL 
 		|| (mysql_row_lengths=mysql_fetch_lengths(mysql_result))==NULL) {
 		RETURN_FALSE;

Modified: trunk/php5/ext/mysql/php_mysql.c
===================================================================
--- trunk/php5/ext/mysql/php_mysql.c	2007-06-28 11:26:49 UTC (rev 558)
+++ trunk/php5/ext/mysql/php_mysql.c	2007-06-28 11:32:50 UTC (rev 559)
@@ -1992,13 +1992,13 @@
 		}
 	}
 
-#ifndef HAVE_MYSQLND
 	if ((result_type & MYSQL_BOTH) == 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either
MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH");
 	}
 	
 	ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
+#ifndef HAVE_MYSQLND
 	if ((mysql_row=mysql_fetch_row(mysql_result))==NULL 
 		|| (mysql_row_lengths=mysql_fetch_lengths(mysql_result))==NULL) {
 		RETURN_FALSE;

Modified: trunk/php6/ext/mysql/php_mysql.c
===================================================================
--- trunk/php6/ext/mysql/php_mysql.c	2007-06-28 11:26:49 UTC (rev 558)
+++ trunk/php6/ext/mysql/php_mysql.c	2007-06-28 11:32:50 UTC (rev 559)
@@ -1946,13 +1946,13 @@
 		}
 	}
 
-#ifndef HAVE_MYSQLND
 	if ((result_type & MYSQL_BOTH) == 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either
MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH");
 	}
 	
 	ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
+#ifndef HAVE_MYSQLND
 	if ((mysql_row=mysql_fetch_row(mysql_result))==NULL 
 		|| (mysql_row_lengths=mysql_fetch_lengths(mysql_result))==NULL) {
 		RETURN_FALSE;

Thread
PHP mysqlnd svn commit: r559 - in trunk: mysqlnd php4/ext/mysql php5/ext/mysql php6/ext/mysqlahristov28 Jun