diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
| commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
| tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext/mysqlnd | |
| parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
| download | php-upstream/5.3.9.tar.gz | |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext/mysqlnd')
28 files changed, 230 insertions, 222 deletions
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 3c4b5c808..ba1f0b75e 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -1,9 +1,12 @@ dnl -dnl $Id: config9.m4 309609 2011-03-23 17:14:28Z andrey $ +dnl $Id: config9.m4 316281 2011-09-06 16:38:22Z johannes $ dnl config.m4 for mysqlnd driver +PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd, + [ --enable-mysqlnd Enable mysqlnd expliciely, will be done implicitly + when required by other extensions], no, yes) -PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd, +PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd], yes, no) @@ -13,7 +16,7 @@ if test -z "$PHP_ZLIB_DIR"; then fi dnl If some extension uses mysqlnd it will get compiled in PHP core -if test "$PHP_MYSQLND_ENABLED" = "yes"; then +if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c" mysqlnd_base_sources="mysqlnd.c mysqlnd_charset.c mysqlnd_wireprotocol.c \ mysqlnd_loaddata.c mysqlnd_net.c mysqlnd_statistics.c \ @@ -27,12 +30,12 @@ if test "$PHP_MYSQLND_ENABLED" = "yes"; then AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support]) mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources" - PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no) + PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared) PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) PHP_INSTALL_HEADERS([ext/mysqlnd/]) fi -if test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then +if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) dnl This creates a file so it has to be after above macros diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index e3f892894..7815c6642 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.c 314740 2011-08-10 14:12:24Z andrey $ */ +/* $Id: mysqlnd.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -886,6 +886,144 @@ PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn, /* }}} */ +/* {{{ mysqlnd_conn::change_user */ +static enum_func_status +MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, + const char *user, + const char *passwd, + const char *db, + zend_bool silent TSRMLS_DC) +{ + size_t user_len; + enum_func_status ret = FAIL; + MYSQLND_PACKET_CHG_USER_RESPONSE * chg_user_resp; + char buffer[MYSQLND_MAX_ALLOWED_USER_LEN + 1 + 1 + SCRAMBLE_LENGTH + MYSQLND_MAX_ALLOWED_DB_LEN + 1 + 2 /* charset*/ + 2]; + char *p = buffer; + const MYSQLND_CHARSET * old_cs = conn->charset; + + DBG_ENTER("mysqlnd_conn::change_user"); + DBG_INF_FMT("conn=%llu user=%s passwd=%s db=%s silent=%u", + conn->thread_id, user?user:"", passwd?"***":"null", db?db:"", (silent == TRUE)?1:0 ); + + SET_ERROR_AFF_ROWS(conn); + + if (!user) { + user = ""; + } + if (!passwd) { + passwd = ""; + } + if (!db) { + db = ""; + } + + /* 1. user ASCIIZ */ + user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_USER_LEN); + memcpy(p, user, user_len); + p += user_len; + *p++ = '\0'; + + /* 2. password SCRAMBLE_LENGTH followed by the scramble or \0 */ + if (passwd[0]) { + *p++ = SCRAMBLE_LENGTH; + php_mysqlnd_scramble((unsigned char *)p, conn->scramble, (unsigned char *)passwd); + p += SCRAMBLE_LENGTH; + } else { + *p++ = '\0'; + } + + /* 3. db ASCIIZ */ + if (db[0]) { + size_t db_len = MIN(strlen(db), MYSQLND_MAX_ALLOWED_DB_LEN); + memcpy(p, db, db_len); + p += db_len; + } + *p++ = '\0'; + + /* + 4. request the current charset, or it will be reset to the system one. + 5.0 doesn't support it. Support added in 5.1.23 by fixing the following bug : + Bug #30472 libmysql doesn't reset charset, insert_id after succ. mysql_change_user() call + */ + if (mysqlnd_get_server_version(conn) >= 50123) { + int2store(p, conn->charset->nr); + p+=2; + } + + if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer, + PROT_LAST /* we will handle the OK packet*/, + silent, TRUE TSRMLS_CC)) { + DBG_RETURN(FAIL); + } + + chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE TSRMLS_CC); + if (!chg_user_resp) { + SET_OOM_ERROR(conn->error_info); + goto end; + } + ret = PACKET_READ(chg_user_resp, conn); + conn->error_info = chg_user_resp->error_info; + + if (conn->error_info.error_no) { + ret = FAIL; + /* + COM_CHANGE_USER is broken in 5.1. At least in 5.1.15 and 5.1.14, 5.1.11 is immune. + bug#25371 mysql_change_user() triggers "packets out of sync" + When it gets fixed, there should be one more check here + */ + if (mysqlnd_get_server_version(conn) > 50113L && mysqlnd_get_server_version(conn) < 50118L) { + MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); + if (redundant_error_packet) { + PACKET_READ(redundant_error_packet, conn); + PACKET_FREE(redundant_error_packet); + DBG_INF_FMT("Server is %u, buggy, sends two ERR messages", mysqlnd_get_server_version(conn)); + } else { + SET_OOM_ERROR(conn->error_info); + } + } + } + if (ret == PASS) { + char * tmp = NULL; + /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */ + tmp = mnd_pestrndup(user, user_len, conn->persistent); + if (conn->user) { + mnd_pefree(conn->user, conn->persistent); + } + conn->user = tmp; + + tmp = mnd_pestrdup(passwd, conn->persistent); + if (conn->passwd) { + mnd_pefree(conn->passwd, conn->persistent); + } + conn->passwd = tmp; + + if (conn->last_message) { + mnd_pefree(conn->last_message, conn->persistent); + conn->last_message = NULL; + } + memset(&conn->upsert_status, 0, sizeof(conn->upsert_status)); + /* set charset for old servers */ + if (mysqlnd_get_server_version(conn) < 50123) { + ret = conn->m->set_charset(conn, old_cs->name TSRMLS_CC); + } + } else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) { + /* old authentication with new server !*/ + DBG_ERR(mysqlnd_old_passwd); + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); + } +end: + PACKET_FREE(chg_user_resp); + + /* + Here we should close all statements. Unbuffered queries should not be a + problem as we won't allow sending COM_CHANGE_USER. + */ + DBG_INF(ret == PASS? "PASS":"FAIL"); + DBG_RETURN(ret); +} +/* }}} */ + + /* {{{ mysqlnd_conn::query */ /* If conn->error_info.error_no is not zero, then we had an error. @@ -1043,7 +1181,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND **conn_array, fd_set *fds TS return ret; } - +/* }}} */ #ifndef PHP_WIN32 #define php_select(m, r, w, e, t) select(m, r, w, e, t) @@ -1407,7 +1545,7 @@ MYSQLND_METHOD(mysqlnd_conn, kill)(MYSQLND * conn, unsigned int pid TSRMLS_DC) char buff[4]; DBG_ENTER("mysqlnd_conn::kill"); - DBG_INF_FMT("conn=%llu pid=%lu", conn->thread_id, pid); + DBG_INF_FMT("conn=%llu pid=%u", conn->thread_id, pid); int4store(buff, pid); @@ -1869,149 +2007,6 @@ PHPAPI const char *mysqlnd_field_type_name(enum mysqlnd_field_types field_type) /* }}} */ -/* {{{ mysqlnd_conn::change_user */ -static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, - const char *user, - const char *passwd, - const char *db, - zend_bool silent TSRMLS_DC) -{ - /* - User could be max 16 * 3 (utf8), pass is 20 usually, db is up to 64*3 - Stack space is not that expensive, so use a bit more to be protected against - buffer overflows. - */ - size_t user_len; - enum_func_status ret = FAIL; - MYSQLND_PACKET_CHG_USER_RESPONSE * chg_user_resp; - char buffer[MYSQLND_MAX_ALLOWED_USER_LEN + 1 + SCRAMBLE_LENGTH + MYSQLND_MAX_ALLOWED_DB_LEN + 1 + 2 /* charset*/ ]; - char *p = buffer; - const MYSQLND_CHARSET * old_cs = conn->charset; - - DBG_ENTER("mysqlnd_conn::change_user"); - DBG_INF_FMT("conn=%llu user=%s passwd=%s db=%s silent=%u", - conn->thread_id, user?user:"", passwd?"***":"null", db?db:"", (silent == TRUE)?1:0 ); - - SET_ERROR_AFF_ROWS(conn); - - if (!user) { - user = ""; - } - if (!passwd) { - passwd = ""; - } - if (!db) { - db = ""; - } - - /* 1. user ASCIIZ */ - user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_USER_LEN); - memcpy(p, user, user_len); - p += user_len; - *p++ = '\0'; - - /* 2. password SCRAMBLE_LENGTH followed by the scramble or \0 */ - if (passwd[0]) { - *p++ = SCRAMBLE_LENGTH; - php_mysqlnd_scramble((unsigned char *)p, conn->scramble, (unsigned char *)passwd); - p += SCRAMBLE_LENGTH; - } else { - *p++ = '\0'; - } - - /* 3. db ASCIIZ */ - if (db[0]) { - size_t db_len = MIN(strlen(db), MYSQLND_MAX_ALLOWED_DB_LEN); - memcpy(p, db, db_len); - p += db_len; - } - *p++ = '\0'; - - /* - 4. request the current charset, or it will be reset to the system one. - 5.0 doesn't support it. Support added in 5.1.23 by fixing the following bug : - Bug #30472 libmysql doesn't reset charset, insert_id after succ. mysql_change_user() call - */ - if (mysqlnd_get_server_version(conn) >= 50123) { - int2store(p, conn->charset->nr); - p+=2; - } - - if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer, - PROT_LAST /* we will handle the OK packet*/, - silent, TRUE TSRMLS_CC)) { - DBG_RETURN(FAIL); - } - - chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE TSRMLS_CC); - if (!chg_user_resp) { - SET_OOM_ERROR(conn->error_info); - goto end; - } - ret = PACKET_READ(chg_user_resp, conn); - conn->error_info = chg_user_resp->error_info; - - if (conn->error_info.error_no) { - ret = FAIL; - /* - COM_CHANGE_USER is broken in 5.1. At least in 5.1.15 and 5.1.14, 5.1.11 is immune. - bug#25371 mysql_change_user() triggers "packets out of sync" - When it gets fixed, there should be one more check here - */ - if (mysqlnd_get_server_version(conn) > 50113L && mysqlnd_get_server_version(conn) < 50118L) { - MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); - if (redundant_error_packet) { - PACKET_READ(redundant_error_packet, conn); - PACKET_FREE(redundant_error_packet); - DBG_INF_FMT("Server is %u, buggy, sends two ERR messages", mysqlnd_get_server_version(conn)); - } else { - SET_OOM_ERROR(conn->error_info); - } - } - } - if (ret == PASS) { - char * tmp = NULL; - /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */ - tmp = mnd_pestrndup(user, user_len, conn->persistent); - if (conn->user) { - mnd_pefree(conn->user, conn->persistent); - } - conn->user = tmp; - - tmp = mnd_pestrdup(passwd, conn->persistent); - if (conn->passwd) { - mnd_pefree(conn->passwd, conn->persistent); - } - conn->passwd = tmp; - - if (conn->last_message) { - mnd_pefree(conn->last_message, conn->persistent); - conn->last_message = NULL; - } - memset(&conn->upsert_status, 0, sizeof(conn->upsert_status)); - /* set charset for old servers */ - if (mysqlnd_get_server_version(conn) < 50123) { - ret = conn->m->set_charset(conn, old_cs->name TSRMLS_CC); - } - } else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) { - /* old authentication with new server !*/ - DBG_ERR(mysqlnd_old_passwd); - SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); - } -end: - PACKET_FREE(chg_user_resp); - - /* - Here we should close all statements. Unbuffered queries should not be a - problem as we won't allow sending COM_CHANGE_USER. - */ - DBG_INF(ret == PASS? "PASS":"FAIL"); - DBG_RETURN(ret); -} -/* }}} */ - - /* {{{ mysqlnd_conn::set_client_option */ static enum_func_status MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 571d1f56a..bf76bfd9f 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,12 +17,12 @@ | Ulf Wendel <uwendel@mysql.com> | +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.h 310735 2011-05-03 09:37:53Z andrey $ */ +/* $Id: mysqlnd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_H #define MYSQLND_H -#define MYSQLND_VERSION "mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $" +#define MYSQLND_VERSION "mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $" #define MYSQLND_VERSION_ID 50008 /* This forces inlining of some accessor functions */ diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index fd957a989..289b2ccb9 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_block_alloc.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" diff --git a/ext/mysqlnd/mysqlnd_block_alloc.h b/ext/mysqlnd/mysqlnd_block_alloc.h index 12ee34079..38e87e308 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.h +++ b/ext/mysqlnd/mysqlnd_block_alloc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_block_alloc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_BLOCK_ALLOC_H #define MYSQLND_BLOCK_ALLOC_H diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index 6c8e7a5cc..5b60711a8 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -122,11 +122,11 @@ static unsigned int check_mb_utf8_sequence(const char *start, const char *end) [F4][80..8F][80..BF][80..BF] */ - if (!((start[1] ^ 0x80) < 0x40 && - (start[2] ^ 0x80) < 0x40 && - (start[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || start[1] >= 0x90) && - (c <= 0xf3 || start[1] <= 0x8F))) + if (!(((zend_uchar)start[1] ^ 0x80) < 0x40 && + ((zend_uchar)start[2] ^ 0x80) < 0x40 && + ((zend_uchar)start[3] ^ 0x80) < 0x40 && + (c >= 0xf1 || (zend_uchar)start[1] >= 0x90) && + (c <= 0xf3 || (zend_uchar)start[1] <= 0x8F))) { return 0; /* invalid utf8 character */ } diff --git a/ext/mysqlnd/mysqlnd_charset.h b/ext/mysqlnd/mysqlnd_charset.h index 69194bea4..2f5d1db27 100644 --- a/ext/mysqlnd/mysqlnd_charset.h +++ b/ext/mysqlnd/mysqlnd_charset.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index a7a13df1b..01d4ea749 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_debug.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index f6a571d43..9bb9f0eb8 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.h 310768 2011-05-04 19:09:12Z andrey $ */ +/* $Id: mysqlnd_debug.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_DEBUG_H #define MYSQLND_DEBUG_H diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h index 279827aa2..c291b4438 100644 --- a/ext/mysqlnd/mysqlnd_enum_n_def.h +++ b/ext/mysqlnd/mysqlnd_enum_n_def.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_enum_n_def.h 307883 2011-01-31 13:52:21Z andrey $ */ +/* $Id: mysqlnd_enum_n_def.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_ENUM_N_DEF_H #define MYSQLND_ENUM_N_DEF_H diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h index 0498f058e..c95539b08 100644 --- a/ext/mysqlnd/mysqlnd_libmysql_compat.h +++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 11413e2c7..557caa294 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 600a65080..e80192850 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -120,6 +120,17 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem net->packet_no = net->compressed_envelope_packet_no = 0; + if (net->stream) { + /* close before opening a new one */ + DBG_INF_FMT("Freeing stream. abstract=%p", net->stream->abstract); + if (net->persistent) { + php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR); + } else { + php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE); + } + net->stream = NULL; + } + if (net->options.timeout_connect) { tv.tv_sec = net->options.timeout_connect; tv.tv_usec = 0; @@ -254,7 +265,7 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t STORE_HEADER_SIZE(safe_storage, uncompressed_payload); int3store(uncompressed_payload, to_be_sent); int1store(uncompressed_payload + 3, net->packet_no); - if (PASS == net->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), tmp_complen, + if (PASS == net->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen, uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE TSRMLS_CC)) { int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent + MYSQLND_HEADER_SIZE); @@ -480,20 +491,22 @@ MYSQLND_METHOD(mysqlnd_net, decode)(zend_uchar * uncompressed_data, size_t uncom /* {{{ mysqlnd_net::encode */ static enum_func_status -MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, +MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC) { #ifdef MYSQLND_COMPRESSION_ENABLED int error; - uLongf tmp_complen = compress_buffer_len; + uLongf tmp_complen = *compress_buffer_len; DBG_ENTER("mysqlnd_net::encode"); error = compress(compress_buffer, &tmp_complen, uncompressed_data, uncompressed_data_len); if (error != Z_OK) { DBG_INF_FMT("compression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR); } else { + *compress_buffer_len = tmp_complen; DBG_INF_FMT("compression successful. compressed size=%lu", tmp_complen); } + DBG_RETURN(error == Z_OK? PASS:FAIL); #else DBG_ENTER("mysqlnd_net::encode"); diff --git a/ext/mysqlnd/mysqlnd_net.h b/ext/mysqlnd/mysqlnd_net.h index 8a0e399b5..d4077aea0 100644 --- a/ext/mysqlnd/mysqlnd_net.h +++ b/ext/mysqlnd/mysqlnd_net.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index 4e2294625..09ca81b1b 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_priv.h 311643 2011-05-31 10:35:07Z andrey $ */ +/* $Id: mysqlnd_priv.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_PRIV_H #define MYSQLND_PRIV_H @@ -147,15 +147,8 @@ #define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR((stmt)->error_info, a, b, c) - -#ifdef ZTS #define CONN_GET_STATE(c) (c)->m->get_state((c) TSRMLS_CC) #define CONN_SET_STATE(c, s) (c)->m->set_state((c), (s) TSRMLS_CC) -#else -#define CONN_GET_STATE(c) ((c)->state) -#define CONN_SET_STATE(c, s) ((c)->state = (s)) -#endif - /* PS stuff */ typedef void (*ps_field_fetch_func)(zval *zv, const MYSQLND_FIELD * const field, diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 61c3089f6..6dc5011a6 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps.c 307921 2011-02-01 16:55:20Z andrey $ */ +/* $Id: mysqlnd_ps.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -41,7 +41,7 @@ static struct st_mysqlnd_stmt_methods *mysqlnd_stmt_methods; /* Exported by mysqlnd_ps_codec.c */ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); -enum_func_status mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC); @@ -97,7 +97,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC) result = stmt->result; result->type = MYSQLND_RES_PS_BUF; - result->m.fetch_row = mysqlnd_fetch_stmt_row_buffered; + result->m.fetch_row = mysqlnd_stmt_fetch_row_buffered; result->m.fetch_lengths = NULL;/* makes no sense */ result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); @@ -724,16 +724,16 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const s TSRMLS_DC) /* }}} */ -/* {{{ mysqlnd_fetch_stmt_row_buffered */ +/* {{{ mysqlnd_stmt_fetch_row_buffered */ enum_func_status -mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { MYSQLND_STMT * s = (MYSQLND_STMT *) param; MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_RES_BUFFERED *set = result->stored_data; unsigned int field_count = result->meta->field_count; - DBG_ENTER("mysqlnd_fetch_stmt_row_buffered"); + DBG_ENTER("mysqlnd_stmt_fetch_row_buffered"); *fetched_anything = FALSE; DBG_INF_FMT("stmt=%lu", stmt != NULL ? stmt->stmt_id : 0L); diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 4be7ead2d..ec0baf2a5 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps_codec.c 309655 2011-03-24 16:12:18Z andrey $ */ +/* $Id: mysqlnd_ps_codec.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 582f5c2ed..6c0fe59b2 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.c 311122 2011-05-17 09:44:11Z andrey $ */ +/* $Id: mysqlnd_result.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -616,19 +616,18 @@ mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) static unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) { - return result->lengths; + /* simulate output of libmysql */ + return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->lengths:NULL; } /* }}} */ -#if !defined(MYSQLND_USE_OPTIMISATIONS) || MYSQLND_USE_OPTIMISATIONS == 0 /* {{{ mysqlnd_res::fetch_lengths */ PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) { return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; } /* }}} */ -#endif /* {{{ mysqlnd_fetch_row_unbuffered_c */ diff --git a/ext/mysqlnd/mysqlnd_result.h b/ext/mysqlnd/mysqlnd_result.h index 3b20a84bc..63523c9fd 100644 --- a/ext/mysqlnd/mysqlnd_result.h +++ b/ext/mysqlnd/mysqlnd_result.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_RESULT_H #define MYSQLND_RESULT_H diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 83a1ae1b1..236be7392 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result_meta.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h index e7d52ce10..d459838bd 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.h +++ b/ext/mysqlnd/mysqlnd_result_meta.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result_meta.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_RESULT_META_H #define MYSQLND_RESULT_META_H diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 8095b7ee8..d25c88adf 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.c 307593 2011-01-19 18:09:17Z andrey $ */ +/* $Id: mysqlnd_statistics.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index f02e08a63..27211c62b 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_statistics.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_STATISTICS_H #define MYSQLND_STATISTICS_H diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index 28bbf07a7..680587f52 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_structs.h 314740 2011-08-10 14:12:24Z andrey $ */ +/* $Id: mysqlnd_structs.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_STRUCTS_H #define MYSQLND_STRUCTS_H @@ -258,7 +258,7 @@ typedef enum_func_status (*func_mysqlnd_net__set_client_option)(MYSQLND_NET * co typedef enum_func_status (*func_mysqlnd_net__network_read)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC); typedef size_t (*func_mysqlnd_net__network_write)(MYSQLND * const conn, const zend_uchar * const buf, size_t count TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_net__decode)(zend_uchar * uncompressed_data, size_t uncompressed_data_len, const zend_uchar * const compressed_data, size_t compressed_data_len TSRMLS_DC); -typedef enum_func_status (*func_mysqlnd_net__encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_net__encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC); typedef size_t (*func_mysqlnd_net__consume_uneaten_data)(MYSQLND_NET * const net, enum php_mysqlnd_server_command cmd TSRMLS_DC); typedef void (*func_mysqlnd_net__free_contents)(MYSQLND_NET * net TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_net__enable_ssl)(MYSQLND_NET * const net TSRMLS_DC); diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 61582a3aa..e7cf47427 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 77a2ec7cf..6d3770b03 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_wireprotocol.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_wireprotocol.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_WIREPROTOCOL_H #define MYSQLND_WIREPROTOCOL_H diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 47c546536..a39909cf0 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysqlnd.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_mysqlnd.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_ini.h" #include "mysqlnd.h" @@ -299,6 +299,11 @@ zend_module_entry mysqlnd_module_entry = { }; /* }}} */ +/* {{{ COMPILE_DL_MYSQLND */ +#ifdef COMPILE_DL_MYSQLND +ZEND_GET_MODULE(mysqlnd) +#endif +/* }}} */ /* * Local variables: diff --git a/ext/mysqlnd/php_mysqlnd.h b/ext/mysqlnd/php_mysqlnd.h index db47bdb00..1ec85262c 100644 --- a/ext/mysqlnd/php_mysqlnd.h +++ b/ext/mysqlnd/php_mysqlnd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqlnd.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_mysqlnd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQLND_H |
