johannes                                 Mon, 05 Mar 2012 23:57:24 +0000

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

Log:
Fix bug #61194 PDO should export compression flag with myslqnd

Bug: https://bugs.php.net/61194 (Closed) PDO should export compression flag 
with myslqnd
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h
    U   
php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c
    U   php/php-src/branches/PHP_5_4/ext/pdo_mysql/pdo_mysql.c
    U   php/php-src/branches/PHP_5_4/ext/pdo_mysql/php_pdo_mysql_int.h
    U   
php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
    U   php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
    U   php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c
    U   php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
    U   php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_3/NEWS	2012-03-05 23:57:24 UTC (rev 323930)
@@ -36,6 +36,12 @@
 - Firebird Database extension (ibase):
   . Fixed bug #60802 (ibase_trans() gives segfault when passing params).

+- PDO_mysql
+  . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
+    always work). (Johannes)
+  . Fixed bug #61194 (PDO should export compression flag with myslqnd).
+    (Johannes)
+
 - Phar:
   . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic)


Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -624,8 +624,8 @@
 		char *init_cmd = NULL;
 #ifndef PDO_USE_MYSQLND
 		char *default_file = NULL, *default_group = NULL;
-		long compress = 0;
 #endif
+		long compress = 0;
 #if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND)
 		char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL;
 #endif
@@ -706,7 +706,7 @@
 			}
 			efree(default_group);
 		}
-
+#endif
 		compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC);
 		if (compress) {
 			if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
@@ -714,7 +714,6 @@
 				goto cleanup;
 			}
 		}
-#endif
 #if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND)
 		ssl_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC);
 		ssl_cert = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC);

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -84,8 +84,8 @@
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE", (long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_FILE", (long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_GROUP", (long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP);
+#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", (long)PDO_MYSQL_ATTR_COMPRESS);
-#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_DIRECT_QUERY", (long)PDO_MYSQL_ATTR_DIRECT_QUERY);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", (long)PDO_MYSQL_ATTR_FOUND_ROWS);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", (long)PDO_MYSQL_ATTR_IGNORE_SPACE);

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:57:24 UTC (rev 323930)
@@ -163,8 +163,8 @@
 	PDO_MYSQL_ATTR_READ_DEFAULT_FILE,
 	PDO_MYSQL_ATTR_READ_DEFAULT_GROUP,
 	PDO_MYSQL_ATTR_MAX_BUFFER_SIZE,
+#endif
 	PDO_MYSQL_ATTR_COMPRESS,
-#endif
 	PDO_MYSQL_ATTR_DIRECT_QUERY,
 	PDO_MYSQL_ATTR_FOUND_ROWS,
 	PDO_MYSQL_ATTR_IGNORE_SPACE,

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:57:24 UTC (rev 323930)
@@ -20,13 +20,13 @@
 		"MYSQL_ATTR_SSL_CA"							=> true,
 		"MYSQL_ATTR_SSL_CAPATH"						=> true,
 		"MYSQL_ATTR_SSL_CIPHER"						=> true,
+		"MYSQL_ATTR_COMPRESS"						=> true,
 	);

 	if (!MySQLPDOTest::isPDOMySQLnd()) {
 		$expected['MYSQL_ATTR_MAX_BUFFER_SIZE']			= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_FILE']		= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_GROUP']		= true;
-		$expected['MYSQL_ATTR_COMPRESS']				= true;
 	}

 	/*

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_4/NEWS	2012-03-05 23:57:24 UTC (rev 323930)
@@ -38,10 +38,20 @@
 - mbstring:
   . MFH mb_ereg_replace_callback() for security enhancements. (Rui)

+- mysqlnd
+  . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
+    (Johannes)
+
 - SOAP
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
     User-Agent header). (carloschilazo at gmail dot com)

+- PDO_mysql
+  . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
+    always work). (Johannes)
+  . Fixed bug #61194 (PDO should export compression flag with myslqnd).
+    (Johannes)
+
 - Phar
   . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
     bytes). (Nikita Popov)

Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -596,8 +596,8 @@
 		char *init_cmd = NULL;
 #ifndef PDO_USE_MYSQLND
 		char *default_file = NULL, *default_group = NULL;
+#endif
 		long compress = 0;
-#endif
 		char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL;
 		H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC);

@@ -676,7 +676,7 @@
 			}
 			efree(default_group);
 		}
-
+#endif
 		compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC);
 		if (compress) {
 			if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
@@ -684,7 +684,7 @@
 				goto cleanup;
 			}
 		}
-#endif
+
 		ssl_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC);
 		ssl_cert = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC);
 		ssl_ca = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CA, NULL TSRMLS_CC);

Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/pdo_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -108,8 +108,8 @@
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE", (long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_FILE", (long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_GROUP", (long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP);
+#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", (long)PDO_MYSQL_ATTR_COMPRESS);
-#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_DIRECT_QUERY", (long)PDO_MYSQL_ATTR_DIRECT_QUERY);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", (long)PDO_MYSQL_ATTR_FOUND_ROWS);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", (long)PDO_MYSQL_ATTR_IGNORE_SPACE);

Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/php_pdo_mysql_int.h
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:57:24 UTC (rev 323930)
@@ -161,8 +161,8 @@
 	PDO_MYSQL_ATTR_READ_DEFAULT_FILE,
 	PDO_MYSQL_ATTR_READ_DEFAULT_GROUP,
 	PDO_MYSQL_ATTR_MAX_BUFFER_SIZE,
+#endif
 	PDO_MYSQL_ATTR_COMPRESS,
-#endif
 	PDO_MYSQL_ATTR_DIRECT_QUERY,
 	PDO_MYSQL_ATTR_FOUND_ROWS,
 	PDO_MYSQL_ATTR_IGNORE_SPACE,

Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:57:24 UTC (rev 323930)
@@ -20,13 +20,13 @@
 		"MYSQL_ATTR_SSL_CA"							=> true,
 		"MYSQL_ATTR_SSL_CAPATH"						=> true,
 		"MYSQL_ATTR_SSL_CIPHER"						=> true,
+		"MYSQL_ATTR_COMPRESS"						=> true,
 	);

 	if (!MySQLPDOTest::isPDOMySQLnd()) {
 		$expected['MYSQL_ATTR_MAX_BUFFER_SIZE']			= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_FILE']		= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_GROUP']		= true;
-		$expected['MYSQL_ATTR_COMPRESS']				= true;
 	}

 	/*

Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -596,8 +596,8 @@
 		char *init_cmd = NULL;
 #ifndef PDO_USE_MYSQLND
 		char *default_file = NULL, *default_group = NULL;
+#endif
 		long compress = 0;
-#endif
 		char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL;
 		H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC);

@@ -676,7 +676,7 @@
 			}
 			efree(default_group);
 		}
-
+#endif
 		compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC);
 		if (compress) {
 			if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
@@ -684,7 +684,7 @@
 				goto cleanup;
 			}
 		}
-#endif
+
 		ssl_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC);
 		ssl_cert = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC);
 		ssl_ca = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CA, NULL TSRMLS_CC);

Modified: php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c	2012-03-05 23:57:24 UTC (rev 323930)
@@ -108,8 +108,8 @@
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE", (long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_FILE", (long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_GROUP", (long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP);
+#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", (long)PDO_MYSQL_ATTR_COMPRESS);
-#endif
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_DIRECT_QUERY", (long)PDO_MYSQL_ATTR_DIRECT_QUERY);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", (long)PDO_MYSQL_ATTR_FOUND_ROWS);
 	REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", (long)PDO_MYSQL_ATTR_IGNORE_SPACE);

Modified: php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h	2012-03-05 23:57:24 UTC (rev 323930)
@@ -161,8 +161,8 @@
 	PDO_MYSQL_ATTR_READ_DEFAULT_FILE,
 	PDO_MYSQL_ATTR_READ_DEFAULT_GROUP,
 	PDO_MYSQL_ATTR_MAX_BUFFER_SIZE,
+#endif
 	PDO_MYSQL_ATTR_COMPRESS,
-#endif
 	PDO_MYSQL_ATTR_DIRECT_QUERY,
 	PDO_MYSQL_ATTR_FOUND_ROWS,
 	PDO_MYSQL_ATTR_IGNORE_SPACE,

Modified: php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:55:12 UTC (rev 323929)
+++ php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt	2012-03-05 23:57:24 UTC (rev 323930)
@@ -20,13 +20,13 @@
 		"MYSQL_ATTR_SSL_CA"							=> true,
 		"MYSQL_ATTR_SSL_CAPATH"						=> true,
 		"MYSQL_ATTR_SSL_CIPHER"						=> true,
+		"MYSQL_ATTR_COMPRESS"						=> true,
 	);

 	if (!MySQLPDOTest::isPDOMySQLnd()) {
 		$expected['MYSQL_ATTR_MAX_BUFFER_SIZE']			= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_FILE']		= true;
 		$expected['MYSQL_ATTR_READ_DEFAULT_GROUP']		= true;
-		$expected['MYSQL_ATTR_COMPRESS']				= true;
 	}

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

Reply via email to