[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt branches/PHP_5_3/ext/oci

2011-08-12 Thread Christopher Jones
sixd Sat, 13 Aug 2011 00:43:34 +

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

Log:
More test portability fixes mostly for gcov.php.net

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/lob_029.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob_64.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_1.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_2.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_3.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_4.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bug27303_1.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bug27303_2.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/bug27303_4.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/lob_029.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194_blob.phpt
U   php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194_blob_64.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt
U   php/php-src/trunk/ext/oci8/tests/lob_029.phpt
U   php/php-src/trunk/ext/oci8/tests/pecl_bug10194.phpt
U   php/php-src/trunk/ext/oci8/tests/pecl_bug10194_blob.phpt
U   php/php-src/trunk/ext/oci8/tests/pecl_bug10194_blob_64.phpt

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2011-08-13 00:00:40 UTC (rev 314856)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2011-08-13 00:43:34 UTC (rev 314857)
@@ -10,6 +10,8 @@
 die("skip test expected to work only with Oracle 11g or greater version of client");
 }
 ?>
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
+--ENV--
+NLS_LANG=
 --FILE--
 
 --FILE--
  true, 'timesten' => false);  // test runs on these DBs
 require(dirname(__FILE__).'/skipif.inc');
+if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
 ?>
 --INI--
 memory_limit=10M

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob.phpt	2011-08-13 00:00:40 UTC (rev 314856)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob.phpt	2011-08-13 00:43:34 UTC (rev 314857)
@@ -5,6 +5,7 @@
 $target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
 require(dirname(__FILE__).'/skipif.inc');
 if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
+if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
 ?>
 --INI--
 memory_limit=3M

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob_64.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob_64.phpt	2011-08-13 00:00:40 UTC (rev 314856)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob_64.phpt	2011-08-13 00:43:34 UTC (rev 314857)
@@ -5,6 +5,7 @@
 $target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on thes
 require(dirname(__FILE__).'/skipif.inc');
 if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
+if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE');
 ?>
 --INI--
 memory_limit=6M

Modified: php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_1.phpt
===
--- php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_char_1.phpt	2011-08-13 00:00:40 UTC (rev 314856)
+++ php/php-src/branches/PHP_5_4/ext/oc

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/spl/spl_iterators.c trunk/ext/spl/spl_iterators.c

2011-08-12 Thread Etienne Kneuss
colder   Fri, 12 Aug 2011 22:20:35 +

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

Log:
Fix CID 593 Mark the missing break by an explicit comment, we DO intend to fall 
through here

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.c
U   php/php-src/trunk/ext/spl/spl_iterators.c

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.c
===
--- php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.c2011-08-12 
22:05:10 UTC (rev 314854)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.c2011-08-12 
22:20:35 UTC (rev 314855)
@@ -214,11 +214,12 @@
zend_clear_exception(TSRMLS_C);
}
}
+   /* fall through */
case RS_START:
if (iterator->funcs->valid(iterator TSRMLS_CC) 
== FAILURE) {
break;
}
-   object->iterators[object->level].state = 
RS_TEST;
+   object->iterators[object->level].state = 
RS_TEST;
/* break; */
case RS_TEST:
ce = object->iterators[object->level].ce;

Modified: php/php-src/trunk/ext/spl/spl_iterators.c
===
--- php/php-src/trunk/ext/spl/spl_iterators.c   2011-08-12 22:05:10 UTC (rev 
314854)
+++ php/php-src/trunk/ext/spl/spl_iterators.c   2011-08-12 22:20:35 UTC (rev 
314855)
@@ -214,6 +214,7 @@
zend_clear_exception(TSRMLS_C);
}
}
+   /* fall through */
case RS_START:
if (iterator->funcs->valid(iterator TSRMLS_CC) 
== FAILURE) {
break;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/spl/spl_array.c trunk/ext/spl/spl_array.c

2011-08-12 Thread Etienne Kneuss
colder   Fri, 12 Aug 2011 22:05:10 +

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

Log:
Fix CID 538/539, explicitely check for something that should never occur

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/spl_array.c
U   php/php-src/trunk/ext/spl/spl_array.c

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_array.c
===
--- php/php-src/branches/PHP_5_4/ext/spl/spl_array.c2011-08-12 21:57:54 UTC 
(rev 314853)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_array.c2011-08-12 22:05:10 UTC 
(rev 314854)
@@ -322,8 +322,11 @@
zval *value;
ALLOC_INIT_ZVAL(value);
zend_symtable_update(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL);
-   zend_symtable_find(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void **) &retval);
-   return retval;
+   if (zend_symtable_find(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void **) &retval) != FAILURE) {
+   return retval;
+   } else {
+   return &EG(uninitialized_zval_ptr);
+   }
} else {
zend_error(E_NOTICE, "Undefined index:  %s", 
Z_STRVAL_P(offset));
return &EG(uninitialized_zval_ptr);
@@ -345,8 +348,11 @@
zval *value;
ALLOC_INIT_ZVAL(value);
zend_hash_index_update(ht, index, 
(void**)&value, sizeof(void*), NULL);
-   zend_hash_index_find(ht, index, (void **) 
&retval);
-   return retval;
+   if (zend_hash_index_find(ht, index, (void **) 
&retval) != FAILURE) {
+   return retval;
+   } else {
+   return &EG(uninitialized_zval_ptr);
+   }
} else {
zend_error(E_NOTICE, "Undefined offset:  %ld", 
index);
return &EG(uninitialized_zval_ptr);

Modified: php/php-src/trunk/ext/spl/spl_array.c
===
--- php/php-src/trunk/ext/spl/spl_array.c   2011-08-12 21:57:54 UTC (rev 
314853)
+++ php/php-src/trunk/ext/spl/spl_array.c   2011-08-12 22:05:10 UTC (rev 
314854)
@@ -322,8 +322,11 @@
zval *value;
ALLOC_INIT_ZVAL(value);
zend_symtable_update(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL);
-   zend_symtable_find(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void **) &retval);
-   return retval;
+   if (zend_symtable_find(ht, Z_STRVAL_P(offset), 
Z_STRLEN_P(offset)+1, (void **) &retval) != FAILURE) {
+   return retval;
+   } else {
+   return &EG(uninitialized_zval_ptr);
+   }
} else {
zend_error(E_NOTICE, "Undefined index:  %s", 
Z_STRVAL_P(offset));
return &EG(uninitialized_zval_ptr);
@@ -345,8 +348,11 @@
zval *value;
ALLOC_INIT_ZVAL(value);
zend_hash_index_update(ht, index, 
(void**)&value, sizeof(void*), NULL);
-   zend_hash_index_find(ht, index, (void **) 
&retval);
-   return retval;
+   if (zend_hash_index_find(ht, index, (void **) 
&retval) != FAILURE) {
+   return retval;
+   } else {
+   return &EG(uninitialized_zval_ptr);
+   }
} else {
zend_error(E_NOTICE, "Undefined offset:  %ld", 
index);
return &EG(uninitialized_zval_ptr);

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/spl/ spl_directory.c

2011-08-12 Thread Etienne Kneuss
colder   Fri, 12 Aug 2011 21:57:54 +

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

Log:
Fix CID 547, make static analyzer happy

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c
===
--- php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-08-12 
21:46:40 UTC (rev 314852)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-08-12 
21:57:54 UTC (rev 314853)
@@ -2431,7 +2431,9 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

-   zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags);
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", 
&intern->flags) == FAILURE) {
+   return;
+   }
 } /* }}} */

 /* {{{ proto int SplFileObject::getFlags()

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/spl/spl_fixedarray.c trunk/ext/spl/spl_fixedarray.c

2011-08-12 Thread Etienne Kneuss
colder   Fri, 12 Aug 2011 21:46:40 +

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

Log:
Fix CID 1211, unused intern variable

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/spl_fixedarray.c
U   php/php-src/trunk/ext/spl/spl_fixedarray.c

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_fixedarray.c
===
--- php/php-src/branches/PHP_5_4/ext/spl/spl_fixedarray.c   2011-08-12 
21:29:41 UTC (rev 314851)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_fixedarray.c   2011-08-12 
21:46:40 UTC (rev 314852)
@@ -602,7 +602,6 @@
 */
 SPL_METHOD(SplFixedArray, toArray)
 {
-   spl_fixedarray_object *intern;
zval *ret, *tmp;
HashTable *ret_ht, *obj_ht;

@@ -610,8 +609,6 @@
return;
}

-   intern = (spl_fixedarray_object 
*)zend_object_store_get_object(getThis() TSRMLS_CC);
-
ALLOC_HASHTABLE(ret_ht);
zend_hash_init(ret_ht, 0, NULL, ZVAL_PTR_DTOR, 0);
ALLOC_INIT_ZVAL(ret);

Modified: php/php-src/trunk/ext/spl/spl_fixedarray.c
===
--- php/php-src/trunk/ext/spl/spl_fixedarray.c  2011-08-12 21:29:41 UTC (rev 
314851)
+++ php/php-src/trunk/ext/spl/spl_fixedarray.c  2011-08-12 21:46:40 UTC (rev 
314852)
@@ -602,7 +602,6 @@
 */
 SPL_METHOD(SplFixedArray, toArray)
 {
-   spl_fixedarray_object *intern;
zval *ret, *tmp;
HashTable *ret_ht, *obj_ht;

@@ -610,8 +609,6 @@
return;
}

-   intern = (spl_fixedarray_object 
*)zend_object_store_get_object(getThis() TSRMLS_CC);
-
ALLOC_HASHTABLE(ret_ht);
zend_hash_init(ret_ht, 0, NULL, ZVAL_PTR_DTOR, 0);
ALLOC_INIT_ZVAL(ret);

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-08-12 Thread Hannes Magnusson
bjoriFri, 12 Aug 2011 18:05:51 +

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

Log:
phpweb karma for richard q

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-08-12 17:19:39 UTC (rev 314843)
+++ SVNROOT/global_avail2011-08-12 18:05:51 UTC (rev 314844)
@@ -226,7 +226,7 @@
 avail|mg|pecl/xattr
 avail|xnoguer|pecl/valkyrie
 avail|ecolinet|pecl/win32std
-avail|rquadling|pecl/win32service
+avail|rquadling|pecl/win32service,web/php/
 avail|aleigh|php/php-src/*/sapi/continuity
 avail|jwk|php/php-src/*/sapi/opengroupware
 avail|makler|pecl/esmtp

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c branches/PHP_5_4/ext/mysqli/mysqli_nonapi.c trunk/ext/mysqli/mysqli_nonapi.c

2011-08-12 Thread Andrey Hristov
andrey   Fri, 12 Aug 2011 14:55:00 +

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

Log:
prevent a crash if cs is NULL, which can happen with MS and lazy connections

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c
U   php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_nonapi.c
U   php/php-src/trunk/ext/mysqli/mysqli_nonapi.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2011-08-12 
14:32:14 UTC (rev 314837)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2011-08-12 
14:55:00 UTC (rev 314838)
@@ -916,7 +916,6 @@
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);

-   object_init(return_value);

 #if !defined(MYSQLI_USE_MYSQLND)
mysql_get_character_set_info(mysql->mysql, &cs);
@@ -930,6 +929,10 @@
comment = cs.comment;
 #else
cs = mysql->mysql->charset;
+   if (!cs) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The connection has 
no charset associated");
+   RETURN_NULL();
+   }
name = cs->name;
collation = cs->collation;
minlength = cs->char_minlen;
@@ -938,6 +941,7 @@
comment = cs->comment;
state = 1;  /* all charsets are compiled in */
 #endif
+   object_init(return_value);

add_property_string(return_value, "charset", (name) ? (char *)name : 
"", 1);
add_property_string(return_value, "collation",(collation) ? (char 
*)collation : "", 1);

Modified: php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_nonapi.c
===
--- php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_nonapi.c 2011-08-12 
14:32:14 UTC (rev 314837)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_nonapi.c 2011-08-12 
14:55:00 UTC (rev 314838)
@@ -992,7 +992,6 @@
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);

-   object_init(return_value);

 #if !defined(MYSQLI_USE_MYSQLND)
mysql_get_character_set_info(mysql->mysql, &cs);
@@ -1006,6 +1005,10 @@
comment = cs.comment;
 #else
cs = mysql->mysql->charset;
+   if (!cs) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The connection has 
no charset associated");
+   RETURN_NULL();
+   }
name = cs->name;
collation = cs->collation;
minlength = cs->char_minlen;
@@ -1014,6 +1017,7 @@
comment = cs->comment;
state = 1;  /* all charsets are compiled in */
 #endif
+   object_init(return_value);

add_property_string(return_value, "charset", (name) ? (char *)name : 
"", 1);
add_property_string(return_value, "collation",(collation) ? (char 
*)collation : "", 1);

Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c
===
--- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2011-08-12 14:32:14 UTC 
(rev 314837)
+++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2011-08-12 14:55:00 UTC 
(rev 314838)
@@ -992,7 +992,6 @@
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);

-   object_init(return_value);

 #if !defined(MYSQLI_USE_MYSQLND)
mysql_get_character_set_info(mysql->mysql, &cs);
@@ -1006,6 +1005,10 @@
comment = cs.comment;
 #else
cs = mysql->mysql->charset;
+   if (!cs) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The connection has 
no charset associated");
+   RETURN_NULL();
+   }
name = cs->name;
collation = cs->collation;
minlength = cs->char_minlen;
@@ -1014,6 +1017,7 @@
comment = cs->comment;
state = 1;  /* all charsets are compiled in */
 #endif
+   object_init(return_value);

add_property_string(return_value, "charset", (name) ? (char *)name : 
"", 1);
add_property_string(return_value, "collation",(collation) ? (char 
*)collation : "", 1);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_param.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_

2011-08-12 Thread Ulf Wendel
uw   Fri, 12 Aug 2011 11:51:44 +

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

Log:
MySQL 5.6 fractional seconds and PS

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
U   
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
U   
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_param.phpt   
2011-08-12 11:49:40 UTC (rev 314819)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_param.phpt   
2011-08-12 11:51:44 UTC (rev 314820)
@@ -304,6 +304,8 @@
func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", 
"a", 870);
func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", 
NULL, 880);

+   if (mysqli_get_server_version($link) >= 50600)
+   func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME", 
"13:27:34.123456", 890, "13:27:34");

$stmt = mysqli_stmt_init($link);
if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (?, 
?)"))

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt  
2011-08-12 11:49:40 UTC (rev 314819)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt  
2011-08-12 11:51:44 UTC (rev 314820)
@@ -294,6 +294,9 @@
func_mysqli_stmt_bind_result($link, $engine, "s", "SET('a', 'b')", "a", 
1740, $hint_str_or_unicode);
func_mysqli_stmt_bind_result($link, $engine, "s", "SET('a', 'b')", 
NULL, 1760, $hint_str_or_unicode);

+   if (mysqli_get_server_version($link) >= 50600)
+   func_mysqli_stmt_bind_result($link, $engine, "s", "TIME", 
"13:31:34.123456", 1770, "13:31:34");
+
/* Check that the function alias exists. It's a deprecated function,
but we have not announce the removal so far, therefore we need to check 
for it */
if (!is_null($tmp = @mysqli_stmt_bind_result()))

Modified: 
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
===
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_param.phpt   
2011-08-12 11:49:40 UTC (rev 314819)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_param.phpt   
2011-08-12 11:51:44 UTC (rev 314820)
@@ -304,6 +304,8 @@
func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", 
"a", 870);
func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", 
NULL, 880);

+   if (mysqli_get_server_version($link) >= 50600)
+   func_mysqli_stmt_bind_datatype($link, $engine, "s", "TIME", 
"13:27:34.123456", 890, "13:27:34");

$stmt = mysqli_stmt_init($link);
if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (?, 
?)"))

Modified: 
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
===
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_result.phpt  
2011-08-12 11:49:40 UTC (rev 314819)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_bind_result.phpt  
2011-08-12 11:51:44 UTC (rev 314820)
@@ -294,6 +294,9 @@
func_mysqli_stmt_bind_result($link, $engine, "s", "SET('a', 'b')", "a", 
1740, $hint_str_or_unicode);
func_mysqli_stmt_bind_result($link, $engine, "s", "SET('a', 'b')", 
NULL, 1760, $hint_str_or_unicode);

+   if (mysqli_get_server_version($link) >= 50600)
+   func_mysqli_stmt_bind_result($link, $engine, "s", "TIME", 
"13:31:34.123456", 1770, "13:31:34");
+
/* Check that the function alias exists. It's a deprecated function,
but we have not announce the removal so far, therefore we need to check 
for it */
if (!is_null($tmp = @mysqli_stmt_bind_result()))

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_param.phpt  
2011-08-12 11:49:40 UTC (rev 314819)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_param.phpt  
2011-08-12 11:51:44 UTC (rev 314820)
@@ -304,6 +304,8 @@
func_mysqli_stmt_bind_datatype($link, $engine, "s", "SET('a', 'b')", 
"a", 870);
func_mysqli_s

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt trunk

2011-08-12 Thread Ulf Wendel
uw   Fri, 12 Aug 2011 11:23:36 +

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

Log:
Andrey, please have a look. Not sure if the test is correct, e.g. MySQL 5.5.3+ 
really needed?

Changed paths:
A   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt
A   
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt
A   
php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt

Added: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt	2011-08-12 11:23:36 UTC (rev 314812)
@@ -0,0 +1,125 @@
+--TEST--
+mysqli_stmt_execute() - SP, next result
+--SKIPIF--
+
+--FILE--
+query("SELECT 1"))
+			printf("[013] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[004] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
+		printf("[014] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+
+	if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25)) BEGIN SELECT ver_in AS _ver_out; SELECT 1 AS _more; END;')) {
+		// two result sets
+		if (!$stmt = mysqli_prepare($link, 'CALL p(?)'))
+			printf("[015] Cannot prepare CALL, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+		$version = 'myversion';
+		if (!mysqli_stmt_bind_param($stmt, 's', $version))
+			printf("[016] Cannot bind input parameter, [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if (!mysqli_stmt_execute($stmt))
+			printf("[017] Cannot execute CALL, [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		$version = NULL;
+		if (!mysqli_stmt_bind_result($stmt, $version) ||
+!mysqli_stmt_fetch($stmt))
+			printf("[018] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if ($version !== "myversion")
+			printf("[019] Results seem wrong, got %s, [%d] %s\n",
+$version,
+mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if (!mysqli_more_results($link) || !mysqli_next_result($link))
+			printf("[020] [%d] %s\n", $link->errno, $link->error);
+
+		$more = NULL;
+		if (!mysqli_stmt_bind_result($stmt, $more) ||
+!mysqli_stmt_fetch($stmt))
+			printf("[021] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if ($more !== 1)
+			printf("[022] Results seem wrong, got %s, [%d] %s\n",
+$more,
+mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if (!mysqli_stmt_close($stmt))
+			printf("[023] Cannot close statement, [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+
+		if (!$link->query("SELECT 1"))
+			printf("[024] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[025] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	mysqli_close($link);
+	print "done!";
+?>
+--CLEAN--
+
+--EXPECTF--
+[010] More results: yes
+[011] Next result: yes
+done!
\ No newline at end of file

Added: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt
===
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt	2011-08-12 11:23:36 UTC (rev 314812)
@@ -0,0 +1,125 @@
+--TEST--
+mysqli_stmt_execute() - SP, next result
+--SKIPIF--
+
+--FILE--
+query("SELECT 1"))
+			printf("[013] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[004] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
+		printf("[014] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+
+	if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25)) BEGIN SELECT ver_in AS _ver_out; SELECT 1 AS _more; END;')) {
+		// two result sets
+		if (!$stmt = mysqli_prepare($link, 'CALL p(?)'))
+			printf("[015] Cannot prepare CALL, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+		$version = 'myversion';
+		if (!mysqli_stmt_bind_param($stmt, 's', $version))
+			printf("[016] Cannot bind input parameter, [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		if (!mysqli_stmt_execute($stmt))
+			printf("[017] Cannot execute CALL, [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+		$version = NULL;
+		if (!mysqli_stmt_bind_result($stmt, $version) ||
+!mysqli_stmt_fetch($stmt))
+			printf("[018] [%d] %s\n"

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt trunk/ext/mysqli/test

2011-08-12 Thread Ulf Wendel
uw   Fri, 12 Aug 2011 11:23:16 +

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

Log:
Andrey, please have a look. This should not cause errors.

Changed paths:
A   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt
A   
php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt
A   
php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt

Added: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	2011-08-12 11:23:16 UTC (rev 314811)
@@ -0,0 +1,75 @@
+--TEST--
+mysqli_stmt_execute() - OUT
+--SKIPIF--
+
+--FILE--
+query("SELECT 1"))
+			printf("[013] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[004] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	mysqli_close($link);
+	print "done!";
+?>
+--CLEAN--
+
+--EXPECTF--
+[008] More results: %s
+[009] Next results: %s
+done!
\ No newline at end of file

Added: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt
===
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	2011-08-12 11:23:16 UTC (rev 314811)
@@ -0,0 +1,75 @@
+--TEST--
+mysqli_stmt_execute() - OUT
+--SKIPIF--
+
+--FILE--
+query("SELECT 1"))
+			printf("[013] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[004] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	mysqli_close($link);
+	print "done!";
+?>
+--CLEAN--
+
+--EXPECTF--
+[008] More results: %s
+[009] Next results: %s
+done!
\ No newline at end of file

Added: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	(rev 0)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt	2011-08-12 11:23:16 UTC (rev 314811)
@@ -0,0 +1,75 @@
+--TEST--
+mysqli_stmt_execute() - OUT
+--SKIPIF--
+
+--FILE--
+query("SELECT 1"))
+			printf("[013] [%d] %s\n", $link->errno, $link->error);
+
+	} else {
+		printf("[004] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	mysqli_close($link);
+	print "done!";
+?>
+--CLEAN--
+
+--EXPECTF--
+[008] More results: %s
+[009] Next results: %s
+done!
\ No newline at end of file
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/ereg/ereg.c branches/PHP_5_4/ext/ereg/regex/regerror.c branches/PHP_5_4/ext/standard/var.c branches/PHP_5_4/main/streams/cast.c trunk/ext/ereg/ereg.c

2011-08-12 Thread Xinchen Hui
laruence Fri, 12 Aug 2011 07:47:03 +

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

Log:
Omitted GCC warning "comparison is always false"

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/ereg/ereg.c
U   php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
U   php/php-src/branches/PHP_5_4/ext/standard/var.c
U   php/php-src/branches/PHP_5_4/main/streams/cast.c
U   php/php-src/trunk/ext/ereg/ereg.c
U   php/php-src/trunk/ext/ereg/regex/regerror.c
U   php/php-src/trunk/ext/ereg/regex.patch
U   php/php-src/trunk/ext/standard/var.c
U   php/php-src/trunk/main/streams/cast.c

Modified: php/php-src/branches/PHP_5_4/ext/ereg/ereg.c
===
--- php/php-src/branches/PHP_5_4/ext/ereg/ereg.c	2011-08-12 05:52:24 UTC (rev 314807)
+++ php/php-src/branches/PHP_5_4/ext/ereg/ereg.c	2011-08-12 07:47:03 UTC (rev 314808)
@@ -474,7 +474,8 @@
 			if (new_l + 1 > buf_len) {
 buf_len = 1 + buf_len + 2 * new_l;
 nbuf = emalloc(buf_len);
-strncpy(nbuf, buf, buf_len-1);
+strncpy(nbuf, buf, buf_len - 1);
+nbuf[buf_len - 1] = '\0';
 efree(buf);
 buf = nbuf;
 			}
@@ -486,7 +487,7 @@
 			walkbuf = &buf[tmp + subs[0].rm_so];
 			walk = replace;
 			while (*walk) {
-if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= (int)re.re_nsub) {
+if ('\\' == *walk && isdigit((unsigned char)walk[1]) && (unsigned char)walk[1] - '0' <= (int)re.re_nsub) {
 	if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1
 		/* this next case shouldn't happen. it does. */
 		&& subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) {

Modified: php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
===
--- php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c	2011-08-12 05:52:24 UTC (rev 314807)
+++ php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c	2011-08-12 07:47:03 UTC (rev 314808)
@@ -82,10 +82,12 @@
 break;

 		if (errcodeĀ®_ITOA) {
-			if (r->code >= 0)
-(void) strncpy(convbuf, r->name, 50);
-			else
+			if (r->code >= 0) {
+(void) strncpy(convbuf, r->name, sizeof(convbuf) - 1);
+convbuf[sizeof(convbuf) - 1] = '\0';
+			} else {
 snprintf(convbuf, sizeof(convbuf), "REG_0x%x", target);
+			}
 			assert(strlen(convbuf) < sizeof(convbuf));
 			s = convbuf;
 		} else

Modified: php/php-src/branches/PHP_5_4/ext/standard/var.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/var.c	2011-08-12 05:52:24 UTC (rev 314807)
+++ php/php-src/branches/PHP_5_4/ext/standard/var.c	2011-08-12 07:47:03 UTC (rev 314808)
@@ -601,7 +601,7 @@

 	PHP_SET_CLASS_ATTRIBUTES(struc);
 	smart_str_appendl(buf, "O:", 2);
-	smart_str_append_long(buf, (long)name_len);
+	smart_str_append_long(buf, (int)name_len);
 	smart_str_appendl(buf, ":\"", 2);
 	smart_str_appendl(buf, class_name, name_len);
 	smart_str_appendl(buf, "\":", 2);
@@ -767,12 +767,12 @@

 	if (ce->serialize(struc, &serialized_data, &serialized_length, (zend_serialize_data *)var_hash TSRMLS_CC) == SUCCESS) {
 		smart_str_appendl(buf, "C:", 2);
-		smart_str_append_long(buf, (long)Z_OBJCE_P(struc)->name_length);
+		smart_str_append_long(buf, (int)Z_OBJCE_P(struc)->name_length);
 		smart_str_appendl(buf, ":\"", 2);
 		smart_str_appendl(buf, Z_OBJCE_P(struc)->name, Z_OBJCE_P(struc)->name_length);
 		smart_str_appendl(buf, "\":", 2);

-		smart_str_append_long(buf, (long)serialized_length);
+		smart_str_append_long(buf, (int)serialized_length);
 		smart_str_appendl(buf, ":{", 2);
 		smart_str_appendl(buf, serialized_data, serialized_length);
 		smart_str_appendc(buf, '}');

Modified: php/php-src/branches/PHP_5_4/main/streams/cast.c
===
--- php/php-src/branches/PHP_5_4/main/streams/cast.c	2011-08-12 05:52:24 UTC (rev 314807)
+++ php/php-src/branches/PHP_5_4/main/streams/cast.c	2011-08-12 07:47:03 UTC (rev 314808)
@@ -271,7 +271,7 @@

 			newstream = php_stream_fopen_tmpfile();
 			if (newstream) {
-int retval = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);
+size_t retval = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);

 if (ret != SUCCESS) {
 	php_stream_close(newstream);

Modified: php/php-src/trunk/ext/ereg/ereg.c
===
--- php/php-src/trunk/ext/ereg/ereg.c	2011-08-12 05:52:24 UTC (rev 314807)
+++ php/php-src/trunk/ext/ereg/ereg.c	2011-08-12 07:47:03 UTC (rev 314808)
@@ -474,7 +474,8 @@
 			if (new_l + 1 > buf_len) {
 buf_len = 1 + buf_len + 2 * new_l;
 nbuf = emalloc(buf_len);
-strncpy(nbuf, buf, buf_len-1);
+strncpy(nbuf, buf, buf_len - 1);
+nbuf[buf_len - 1] = '\0';
 efree(buf);
 buf =