[PHP-CVS] com php-src: add the news about recent commits: NEWS

2013-02-08 Thread Andrey Hristov
Commit:2d30a192f0b387bd2ae291f1ddd5a47432dbe5df
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 11:12:54 
+0100
Parents:   e1e22fd2e4b2c036589162fed9198cd9ca210445
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2d30a192f0b387bd2ae291f1ddd5a47432dbe5df

Log:
add the news about recent commits

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 3bb6ace..2e2fc55 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,17 @@ PHP  
  NEWS
   . Cherry-picked UConverter wrapper, which had accidentaly been committed only
 to master.
 
+- mysqli
+  . Add mysqli_begin_transaction()/mysqli::begin_transaction(). Implemented all
+options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
+   and ROLLBACK through options to mysqli_commit()/mysqli_rollback() and 
their
+   respective OO counterparts. They work in libmysql and mysqlnd mode. 
(Andrey)
+
+- mysqlnd
+  . Add new begin_transaction() call to the connection object. Implemented all
+options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
+   and ROLLBACK. (Andrey)
+
 - Sockets:
   . Added recvmsg() and sendmsg() wrappers. (Gustavo)
 See https://wiki.php.net/rfc/sendrecvmsg


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



Re: [PHP-CVS] com php-src: Fixed bug #64135 (Exceptions from set_error_handler are not always propagated): NEWS Zend/tests/bug61767.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2013-02-08 Thread Nikita Popov
On Fri, Feb 8, 2013 at 4:11 AM, Laruence larue...@php.net wrote:

 On Fri, Feb 8, 2013 at 3:36 AM, Nikita Popov nikita@gmail.com wrote:
  On Thu, Feb 7, 2013 at 4:44 PM, Xinchen Hui larue...@php.net wrote:
 
  Commit:290509755ac4a3279b2b31b899aa9f2dd780f5f4
  Author:Xinchen Hui larue...@php.net Thu, 7 Feb 2013
 23:44:46
  +0800
  Parents:   0547a36e95ec36025a30e93e971d26b6b1ecf0e9
  Branches:  PHP-5.5
 
  Link:
 
 http://git.php.net/?p=php-src.git;a=commitdiff;h=290509755ac4a3279b2b31b899aa9f2dd780f5f4
 
  Log:
  Fixed bug #64135 (Exceptions from set_error_handler are not always
  propagated)
 
 
  Is there any particular reason why the exception check was added only the
  that error branch? Can't it be done right after the GET_OP1_OBJ_ZVAL_PTR
 in
  http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2442? This way it
 would
  cover the other error conditions as well.
 Hey:

 could you please example one, which will trigger a error(warning,
 notice) out of that branch?


Looking at the code a bit more, you are right, those branches can't be
reached. The only warning that the GET_ZVAL_PTR can trigger is an undefined
variable in which case the return value will be an uninited zval, which
will always use the last error branch.

What I did notice though is that this commit just fixes one out of very
many cases where something like this or something similar could occur. E.g.
just a few lines above it the same problem exists:
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2432

So if you change the test code from $undefinedObject-$definedMethod() to
$definedObject-$undefinedMethod() or $undefinedObject-$undefinedMethod()
it will still fail.

A few lines higher FETCH_CLASS has the same problem (
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2398). Going down a
bit INIT_STATIC_METHOD_CALL has this too:
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2548.
INIT_FCALL_BY_NAME also has this:
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2753 So you can
trigger it with just $undefined() too. Again the same thing in THROW:
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2963 (throw
$undefined;).


I could continue this list, but I think you get the point ^^ This issue
exists pretty much everywhere where a ZVAL_PTR fetch is followed by some
error condition that can happen when the zval is NULL. And we have a *lot*
of those. So I'm not sure that it really makes sense to fix one of those
cases and leave 50 others intact. Either this should be fixed generically
(e.g. on the side of GET_ZVAL_PTR, though that might incur a performance
penalty) or should be just left alone.

Thanks,
Nikita


[PHP-CVS] svn: /SVNROOT/ global_avail

2013-02-08 Thread Johannes Schlüter
johannes Fri, 08 Feb 2013 14:45:43 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=329453

Log:
Move ssdeep to git (on request by Tyrael)

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2013-02-08 10:41:06 UTC (rev 329452)
+++ SVNROOT/global_avail2013-02-08 14:45:43 UTC (rev 329453)
@@ -344,7 +344,7 @@
 avail|koubel|pecl/rrd,phpdoc
 avail|mbechler|pecl/krb5,phpdoc
 avail|cubrid|pecl/cubrid,phpdoc
-avail|treffynnon|pecl/ssdeep,phpdoc
+avail|treffynnon|pecl/text/ssdeep.git,phpdoc
 avail|nicolas,nathanb|pecl/judy,phpdoc
 avail|hanez|pecl/pcsc,phpdoc
 avail|martynas|pecl/htscanner,phpdoc

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

[PHP-CVS] com php-src: Add savepoint and rollback to savepoint support: ext/mysqlnd/mysqlnd.c ext/mysqlnd/mysqlnd.h ext/mysqlnd/mysqlnd_structs.h

2013-02-08 Thread Andrey Hristov
Commit:666a83566077d1db195fd17d088062434b6202fa
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 16:36:17 
+0100
Parents:   2d30a192f0b387bd2ae291f1ddd5a47432dbe5df
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=666a83566077d1db195fd17d088062434b6202fa

Log:
Add savepoint and rollback to savepoint support

Changed paths:
  M  ext/mysqlnd/mysqlnd.c
  M  ext/mysqlnd/mysqlnd.h
  M  ext/mysqlnd/mysqlnd_structs.h


Diff:
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 959f3e0..ccd8af5 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -2761,6 +2761,70 @@ MYSQLND_METHOD(mysqlnd_conn_data, 
tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
 /* }}} */
 
 
+/* {{{ mysqlnd_conn_data::tx_savepoint */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint)(MYSQLND_CONN_DATA * conn, 
const char * const name TSRMLS_DC)
+{
+   size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, 
tx_savepoint);
+   enum_func_status ret = FAIL;
+   DBG_ENTER(mysqlnd_conn_data::tx_savepoint);
+
+   if (PASS == conn-m-local_tx_start(conn, this_func TSRMLS_CC)) {
+   do {
+   char * query;
+   unsigned int query_len;
+   if (!name) {
+   SET_CLIENT_ERROR(*conn-error_info, 
CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, Savepoint name not provided);
+   break;
+   }
+   query_len = mnd_sprintf(query, 0, SAVEPOINT `%s`, 
name);
+   if (!query) {
+   SET_OOM_ERROR(*conn-error_info);
+   break;
+   }
+   ret = conn-m-query(conn, query, query_len TSRMLS_CC);
+   mnd_sprintf_free(query);
+   } while (0);
+   conn-m-local_tx_end(conn, this_func, ret TSRMLS_CC);  
+   }
+
+   DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_conn_data::tx_savepoint_release */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint_release)(MYSQLND_CONN_DATA * 
conn, const char * const name TSRMLS_DC)
+{
+   size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, 
tx_savepoint_release);
+   enum_func_status ret = FAIL;
+   DBG_ENTER(mysqlnd_conn_data::tx_savepoint_release);
+
+   if (PASS == conn-m-local_tx_start(conn, this_func TSRMLS_CC)) {
+   do {
+   char * query;
+   unsigned int query_len;
+   if (!name) {
+   SET_CLIENT_ERROR(*conn-error_info, 
CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, Savepoint name not provided);
+   break;
+   }
+   query_len = mnd_sprintf(query, 0, RELEASE SAVEPOINT 
`%s`, name);
+   if (!query) {
+   SET_OOM_ERROR(*conn-error_info);
+   break;
+   }
+   ret = conn-m-query(conn, query, query_len TSRMLS_CC);
+   mnd_sprintf_free(query);
+   } while (0);
+   conn-m-local_tx_end(conn, this_func, ret TSRMLS_CC);  
+   }
+
+   DBG_RETURN(ret);
+}
+/* }}} */
+
+
 /* {{{ mysqlnd_conn_data::local_tx_start */
 static enum_func_status
 MYSQLND_METHOD(mysqlnd_conn_data, local_tx_start)(MYSQLND_CONN_DATA * conn, 
size_t this_func TSRMLS_DC)
@@ -2878,6 +2942,8 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, tx_begin),
MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback),
MYSQLND_METHOD(mysqlnd_conn_data, tx_cor_options_to_string),
+   MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint),
+   MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint_release),
 
MYSQLND_METHOD(mysqlnd_conn_data, local_tx_start),
MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end),
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index 7adf3b6..4093363 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -195,6 +195,8 @@ PHPAPI void 
mysqlnd_set_local_infile_handler(MYSQLND_CONN_DATA * const conn, con
 #define mysqlnd_begin_transaction(conn,flags,name) 
((conn)-data)-m-tx_begin((conn)-data, (flags), (name) TSRMLS_CC)
 #define mysqlnd_commit(conn, flags, name)  
((conn)-data)-m-tx_commit_or_rollback((conn)-data, TRUE, (flags), (name) 
TSRMLS_CC)
 #define mysqlnd_rollback(conn, flags, name)
((conn)-data)-m-tx_commit_or_rollback((conn)-data, FALSE, (flags), (name) 
TSRMLS_CC)
+#define mysqlnd_savepoint(conn, name)  
((conn)-data)-m-tx_savepoint((conn)-data, (name) TSRMLS_CC)
+#define mysqlnd_release_savepoint(conn, name) 
((conn)-data)-m-tx_savepoint_release((conn)-data, (name) TSRMLS_CC)
 #define mysqlnd_list_dbs(conn, wild)   

[PHP-CVS] com php-src: Add the constants needed for mysqli_commit(), _rollback() and begin_transaction(): ext/mysqli/mysqli.c ext/mysqli/tests/mysqli_constants.phpt

2013-02-08 Thread Andrey Hristov
Commit:0da369ae5048185f8e5e26e0e89191de09da22cb
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 17:05:25 
+0100
Parents:   666a83566077d1db195fd17d088062434b6202fa
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0da369ae5048185f8e5e26e0e89191de09da22cb

Log:
Add the constants needed for mysqli_commit(), _rollback() and
begin_transaction()

Changed paths:
  M  ext/mysqli/mysqli.c
  M  ext/mysqli/tests/mysqli_constants.phpt


Diff:
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 22e75cd..1731bb7 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -846,6 +846,16 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT(MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, 
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, CONST_CS | CONST_PERSISTENT);
 #endif
 
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT, 
TRANS_START_WITH_CONSISTENT_SNAPSHOT, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_START_READ_WRITE, 
TRANS_START_READ_WRITE, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_START_READ_ONLY, 
TRANS_START_READ_ONLY, CONST_CS | CONST_PERSISTENT);
+
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_COR_AND_CHAIN, 
TRANS_COR_AND_CHAIN, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_COR_AND_NO_CHAIN, 
TRANS_COR_AND_NO_CHAIN, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_COR_RELEASE, TRANS_COR_RELEASE, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(MYSQLI_TRANS_COR_NO_RELEASE, 
TRANS_COR_NO_RELEASE, CONST_CS | CONST_PERSISTENT);
+
+
 #ifdef MYSQLI_USE_MYSQLND
mysqlnd_reverse_api_register_api(mysqli_reverse_api TSRMLS_CC);
 #endif
diff --git a/ext/mysqli/tests/mysqli_constants.phpt 
b/ext/mysqli/tests/mysqli_constants.phpt
index 7c0f6a9..7c6dacd 100644
--- a/ext/mysqli/tests/mysqli_constants.phpt
+++ b/ext/mysqli/tests/mysqli_constants.phpt
@@ -32,7 +32,7 @@ require_once('skipifconnectfailure.inc');
MYSQLI_ASSOC  = true,
MYSQLI_NUM= true,
MYSQLI_BOTH   = true,
-   MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH= true,
+   MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH= true,
MYSQLI_NOT_NULL_FLAG  = true,
MYSQLI_PRI_KEY_FLAG   = true,
MYSQLI_UNIQUE_KEY_FLAG= true,
@@ -86,14 +86,21 @@ require_once('skipifconnectfailure.inc');
MYSQLI_SET_CHARSET_NAME   = true,
MYSQLI_SET_CHARSET_DIR= true,
MYSQLI_REFRESH_GRANT  = true,
-   MYSQLI_REFRESH_LOG= true,
+   MYSQLI_REFRESH_LOG= true,
MYSQLI_REFRESH_TABLES = true,
MYSQLI_REFRESH_HOSTS  = true,
MYSQLI_REFRESH_STATUS = true,
MYSQLI_REFRESH_THREADS= true,
MYSQLI_REFRESH_SLAVE  = true,
MYSQLI_REFRESH_MASTER = true,
-   MYSQLI_DEBUG_TRACE_ENABLED= true,
+   MYSQLI_DEBUG_TRACE_ENABLED= true,
+   MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT = true,
+   MYSQLI_TRANS_START_READ_WRITE = true,
+   MYSQLI_TRANS_START_READ_ONLY  = true,
+   MYSQLI_TRANS_COR_AND_CHAIN= true,
+   MYSQLI_TRANS_COR_AND_NO_CHAIN = true,
+   MYSQLI_TRANS_COR_RELEASE  = true,
+   MYSQLI_TRANS_COR_NO_RELEASE   = true,
);
 
/* depends on the build - experimental */


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



[PHP-CVS] com php-src: update test case: ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt

2013-02-08 Thread Andrey Hristov
Commit:a5b426eeffdb4f35e927d268ff82ffb67d8f889e
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 18:28:22 
+0100
Parents:   43ecd8fe1b307945df0e45ed14cab4be8aacdedb
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a5b426eeffdb4f35e927d268ff82ffb67d8f889e

Log:
update test case

Changed paths:
  M  ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt


Diff:
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt 
b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
index c62cb52..259fcd9 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
@@ -892,6 +892,29 @@ isPassedByReference: no
 isOptional: no
 isDefaultValueAvailable: no
 
+Inspecting method 'release_savepoint'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 256
+Number of Parameters: 1
+Number of Required Parameters: 1
+
+Inspecting parameter 'name' of method 'release_savepoint'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: no
+isDefaultValueAvailable: no
+
 Inspecting method 'rollback'
 isFinal: no
 isAbstract: no
@@ -922,6 +945,29 @@ isPassedByReference: no
 isOptional: yes
 isDefaultValueAvailable: no
 
+Inspecting method 'savepoint'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 256
+Number of Parameters: 1
+Number of Required Parameters: 1
+
+Inspecting parameter 'name' of method 'savepoint'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: no
+isDefaultValueAvailable: no
+
 Inspecting method 'select_db'
 isFinal: no
 isAbstract: no


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



[PHP-CVS] com php-src: mysqli_savepoint()/mysqli_release_savepoint(): ext/mysqli/mysqli_api.c ext/mysqli/mysqli_fe.c ext/mysqli/mysqli_fe.h ext/mysqli/mysqli_nonapi.c ext/mysqli/tests/mysqli_class_mys

2013-02-08 Thread Andrey Hristov
Commit:43ecd8fe1b307945df0e45ed14cab4be8aacdedb
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 18:09:50 
+0100
Parents:   0da369ae5048185f8e5e26e0e89191de09da22cb
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=43ecd8fe1b307945df0e45ed14cab4be8aacdedb

Log:
mysqli_savepoint()/mysqli_release_savepoint()

Changed paths:
  M  ext/mysqli/mysqli_api.c
  M  ext/mysqli/mysqli_fe.c
  M  ext/mysqli/mysqli_fe.h
  M  ext/mysqli/mysqli_nonapi.c
  M  ext/mysqli/tests/mysqli_class_mysqli_interface.phpt


Diff:
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 760ee3c..3d651fc 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -714,7 +714,7 @@ PHP_FUNCTION(mysqli_commit)
 #if !defined(MYSQLI_USE_MYSQLND)
if (mysqli_commit_or_rollback_libmysql(mysql-mysql, TRUE, flags, 
name)) {
 #else
-   if (mysqlnd_commit(mysql-mysql, flags, name)) {
+   if (FAIL == mysqlnd_commit(mysql-mysql, flags, name)) {
 #endif
RETURN_FALSE;
}
@@ -1960,7 +1960,7 @@ PHP_FUNCTION(mysqli_rollback)
 #if !defined(MYSQLI_USE_MYSQLND)
if (mysqli_commit_or_rollback_libmysql(mysql-mysql, FALSE, flags, 
name)) {
 #else
-   if (mysqlnd_rollback(mysql-mysql, flags, name)) {
+   if (FAIL == mysqlnd_rollback(mysql-mysql, flags, name)) {
 #endif
RETURN_FALSE;
}
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index 411ab11..6f2e404 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -97,6 +97,24 @@ 
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0)
ZEND_ARG_INFO(0, name)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_savepoint, 0, 0, 2)
+   MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_savepoint, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_release_savepoint, 0, 0, 2)
+   MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_commit, 0, 0, 1)
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
ZEND_ARG_INFO(0, flags)
@@ -430,7 +448,9 @@ const zend_function_entry mysqli_functions[] = {
 #if defined(MYSQLI_USE_MYSQLND)
PHP_FE(mysqli_reap_async_query, 
arginfo_mysqli_only_link)
 #endif
+   PHP_FE(mysqli_release_savepoint,
arginfo_mysqli_release_savepoint)
PHP_FE(mysqli_rollback, 
arginfo_mysqli_rollback)
+   PHP_FE(mysqli_savepoint,
arginfo_mysqli_savepoint)
PHP_FE(mysqli_select_db,
arginfo_mysqli_select_db)
 #ifdef HAVE_MYSQLI_SET_CHARSET
PHP_FE(mysqli_set_charset,  
arginfo_mysqli_set_charset)
@@ -528,7 +548,9 @@ const zend_function_entry mysqli_link_methods[] = {
 #endif
PHP_FALIAS(escape_string, mysqli_real_escape_string, 
arginfo_class_mysqli_real_escape_string)
PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query)
+   PHP_FALIAS(release_savepoint, mysqli_release_savepoint, 
arginfo_class_mysqli_release_savepoint)
PHP_FALIAS(rollback, mysqli_rollback, arginfo_class_mysqli_rollback)
+   PHP_FALIAS(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint)
PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db)
 #ifdef HAVE_MYSQLI_SET_CHARSET
PHP_FALIAS(set_charset, mysqli_set_charset, 
arginfo_class_mysqli_set_charset)
diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h
index e6cd3a6..7e447c6 100644
--- a/ext/mysqli/mysqli_fe.h
+++ b/ext/mysqli/mysqli_fe.h
@@ -108,6 +108,8 @@ PHP_FUNCTION(mysqli_sqlstate);
 PHP_FUNCTION(mysqli_ssl_set);
 PHP_FUNCTION(mysqli_stat);
 PHP_FUNCTION(mysqli_refresh);
+PHP_FUNCTION(mysqli_savepoint);
+PHP_FUNCTION(mysqli_release_savepoint);
 PHP_FUNCTION(mysqli_stmt_affected_rows);
 PHP_FUNCTION(mysqli_stmt_close);
 PHP_FUNCTION(mysqli_stmt_data_seek);
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index c08fbae..c3a56fc 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -1112,7 +1112,7 @@ PHP_FUNCTION(mysqli_begin_transaction)
RETURN_FALSE;
}
 #else
-   if (mysqlnd_begin_transaction(mysql-mysql, flags, name)) {
+   if (FAIL == mysqlnd_begin_transaction(mysql-mysql, flags, name)) {
RETURN_FALSE;
}
 #endif
@@ -1121,6 +1121,75 @@ PHP_FUNCTION(mysqli_begin_transaction)
 /* }}} */
 
 
+#if !defined(MYSQLI_USE_MYSQLND)
+/* {{{ 

[PHP-CVS] com php-src: news for mysqli_savepoint and mysql_release_savepoint: NEWS

2013-02-08 Thread Andrey Hristov
Commit:3d9a31efdfbbc3d73b8c94649f38035277264151
Author:Andrey Hristov and...@php.net Fri, 8 Feb 2013 18:33:45 
+0100
Parents:   a5b426eeffdb4f35e927d268ff82ffb67d8f889e
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3d9a31efdfbbc3d73b8c94649f38035277264151

Log:
news for mysqli_savepoint and mysql_release_savepoint

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 2e2fc55..f7882de 100644
--- a/NEWS
+++ b/NEWS
@@ -23,15 +23,17 @@ PHP 
   NEWS
 to master.
 
 - mysqli
-  . Add mysqli_begin_transaction()/mysqli::begin_transaction(). Implemented all
+  . Added mysqli_begin_transaction()/mysqli::begin_transaction(). Implemented 
all
 options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
and ROLLBACK through options to mysqli_commit()/mysqli_rollback() and 
their
respective OO counterparts. They work in libmysql and mysqlnd mode. 
(Andrey)
+  . Added mysqli_savepoint(), mysqli_release_savepoint(). (Andrey)
 
 - mysqlnd
   . Add new begin_transaction() call to the connection object. Implemented all
 options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
and ROLLBACK. (Andrey)
+  . Added mysqlnd_savepoint(), mysqlnd_release_savepoint(). (Andrey)
 
 - Sockets:
   . Added recvmsg() and sendmsg() wrappers. (Gustavo)


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