mirror of
https://github.com/php/php-src.git
synced 2025-01-05 10:23:30 +08:00
revert to previous behavior
This commit is contained in:
parent
113cd9dc0f
commit
d4a1f5ac06
@ -2335,10 +2335,12 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, send_close),
|
||||
|
||||
MYSQLND_METHOD(mysqlnd_conn, ssl_set),
|
||||
mysqlnd_result_init,
|
||||
MYSQLND_METHOD(mysqlnd_conn, set_autocommit),
|
||||
mysqlnd_result_init
|
||||
#ifdef AUTOCOMMIT_TX_COMMIT_ROLLBACK
|
||||
,MYSQLND_METHOD(mysqlnd_conn, set_autocommit),
|
||||
MYSQLND_METHOD(mysqlnd_conn, tx_commit),
|
||||
MYSQLND_METHOD(mysqlnd_conn, tx_rollback)
|
||||
#endif
|
||||
MYSQLND_CLASS_METHODS_END;
|
||||
|
||||
|
||||
|
@ -198,9 +198,15 @@ PHPAPI void mysqlnd_local_infile_default(MYSQLND *conn);
|
||||
PHPAPI void mysqlnd_set_local_infile_handler(MYSQLND * const conn, const char * const funcname);
|
||||
|
||||
/* Simple commands */
|
||||
#if AUTOCOMMIT_TX_COMMIT_ROLLBACK
|
||||
#define mysqlnd_autocommit(conn, mode) (conn)->m->set_autocommit((conn), (mode) TSRMLS_CC)
|
||||
#define mysqlnd_commit(conn) (conn)->m->tx_commit((conn) TSRMLS_CC)
|
||||
#define mysqlnd_rollback(conn) (conn)->m->tx_rollback((conn) TSRMLS_CC)
|
||||
#else
|
||||
#define mysqlnd_autocommit(conn, mode) (conn)->m->query((conn),(mode) ? "SET AUTOCOMMIT=1":"SET AUTOCOMMIT=0", 16 TSRMLS_CC)
|
||||
#define mysqlnd_commit(conn) (conn)->m->query((conn), "COMMIT", sizeof("COMMIT")-1 TSRMLS_CC)
|
||||
#define mysqlnd_rollback(conn) (conn)->m->query((conn), "ROLLBACK", sizeof("ROLLBACK")-1 TSRMLS_CC)
|
||||
#endif
|
||||
#define mysqlnd_list_dbs(conn, wild) (conn)->m->list_method((conn), wild? "SHOW DATABASES LIKE %s":"SHOW DATABASES", (wild), NULL TSRMLS_CC)
|
||||
#define mysqlnd_list_fields(conn, tab,wild) (conn)->m->list_fields((conn), (tab), (wild) TSRMLS_CC)
|
||||
#define mysqlnd_list_processes(conn) (conn)->m->list_method((conn), "SHOW PROCESSLIST", NULL, NULL TSRMLS_CC)
|
||||
|
@ -482,9 +482,11 @@ struct st_mysqlnd_conn_methods
|
||||
func_mysqlnd_conn__ssl_set ssl_set;
|
||||
|
||||
func_mysqlnd_conn__result_init result_init;
|
||||
#if AUTOCOMMIT_TX_COMMIT_ROLLBACK
|
||||
func_mysqlnd_conn__set_autocommit set_autocommit;
|
||||
func_mysqlnd_conn__tx_commit tx_commit;
|
||||
func_mysqlnd_conn__tx_rollback tx_rollback;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user