com php-src: Add mysqli support - constants and checking in mysqli_options() for the new constant for pas sword expriration: ext/mysqli/mysqli.c
ext/mysqli/mys qli_api.c
| From: | Andrey Hristov | Date: | Wed, 09 Jan 2013 18:14:48 +0000 |
| Subject: | com php-src: Add mysqli support - constants and checking in mysqli_options() for the new constant for pas sword expriration: ext/mysqli/mysqli.c ext/mysqli/mys qli_api.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70910@lists.php.net to get a copy of this message | ||
Commit: d430b5a4eb26679a6dfa7055dff43cae8dabd20e
Author: Andrey Hristov <andrey@php.net> Wed, 9 Jan 2013 19:14:48 +0100
Parents: 258c76eb41a7eaf8e1e7b4994fa5f268c2060039
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d430b5a4eb26679a6dfa7055dff43cae8dabd20e
Log:
Add mysqli support - constants and checking in mysqli_options() for the
new constant for password expriration
Changed paths:
M ext/mysqli/mysqli.c
M ext/mysqli/mysqli_api.c
Diff:
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 1a7d72f..a4c1b87 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -838,6 +838,9 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT("MYSQLI_REFRESH_BACKUP_LOG", REFRESH_BACKUP_LOG, CONST_CS |
CONST_PERSISTENT);
#endif
+#if MYSQL_VERSION_ID >= 50611 || defined(MYSQLI_USE_MYSQLND)
+ REGISTER_LONG_CONSTANT("MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS",
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, CONST_CS | CONST_PERSISTENT);
+#endif
#ifdef MYSQLI_USE_MYSQLND
mysqlnd_reverse_api_register_api(&mysqli_reverse_api TSRMLS_CC);
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 277322f..2cda0aa 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1672,6 +1672,9 @@ static int mysqli_options_get_option_zval_type(int option)
#ifdef MYSQL_OPT_SSL_VERIFY_SERVER_CERT
REGISTER_LONG_CONSTANT("MYSQLI_OPT_SSL_VERIFY_SERVER_CERT",
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
#endif /* MySQL 5.1.1., mysqlnd @ PHP 5.3.3 */
+#if MYSQL_VERSION_ID >= 50611 || defined(MYSQLI_USE_MYSQLND)
+ case MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS:
+#endif
return IS_LONG;
#ifdef MYSQL_SHARED_MEMORY_BASE_NAME