diff options
author | Derick Rethans <github@derickrethans.nl> | 2019-06-21 16:52:29 +0100 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2019-06-21 16:52:29 +0100 |
commit | 5bc7e4e6f4f9a45f78a613c90f34b7cf86b35d51 (patch) | |
tree | 869b9e8324cb49b994843b3464048c71e721d76b | |
parent | d82b270fa45a66321a683dd54476f0a633f4d919 (diff) | |
parent | d3112adf7f22a6eede0c90218ffd1badcaaad1a0 (diff) | |
download | php-git-5bc7e4e6f4f9a45f78a613c90f34b7cf86b35d51.tar.gz |
Merge branch 'PHP-7.4'
-rw-r--r-- | ext/mysqli/mysqli.c | 1 | ||||
-rw-r--r-- | ext/mysqli/mysqli_prop.c | 33 | ||||
-rw-r--r-- | ext/mysqli/tests/bug34810.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/bug55859.phpt | 20 | ||||
-rw-r--r-- | ext/mysqli/tests/connect.inc | 2 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_class_mysqli_interface.phpt | 9 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt | 9 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_kill.phpt | 5 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_real_connect.phpt | 2 |
10 files changed, 2 insertions, 87 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 9d065917cb..61a06e88f5 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -605,7 +605,6 @@ PHP_MINIT_FUNCTION(mysqli) zend_declare_property_null(ce, "insert_id", sizeof("insert_id") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "server_info", sizeof("server_info") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "server_version", sizeof("server_version") - 1, ZEND_ACC_PUBLIC); - zend_declare_property_null(ce, "stat", sizeof("stat") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "sqlstate", sizeof("sqlstate") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "protocol_version", sizeof("protocol_version") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "thread_id", sizeof("thread_id") - 1, ZEND_ACC_PUBLIC); diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index 25985927dc..eab1a0676c 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -234,38 +234,6 @@ MYSQLI_MAP_PROPERTY_FUNC_STRING(link_sqlstate_read, mysql_sqlstate, MYSQLI_GET_M MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT) MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT) -/* {{{ property link_stat_read */ -static zval *link_stat_read(mysqli_object *obj, zval *retval) -{ - MY_MYSQL *mysql; - - ZVAL_NULL(retval); - -#if defined(MYSQLI_USE_MYSQLND) - CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); -#else - CHECK_STATUS(MYSQLI_STATUS_VALID); -#endif - - mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; - - if (mysql) { -#if defined(MYSQLI_USE_MYSQLND) - zend_string * stat_msg; - if (mysqlnd_stat(mysql->mysql, &stat_msg) == PASS) { - ZVAL_STR(retval, stat_msg); - } -#else - char * stat_msg; - if ((stat_msg = (char *)mysql_stat(mysql->mysql))) { - ZVAL_STRING(retval, stat_msg); - } -#endif - } - return retval; -} -/* }}} */ - /* result properties */ /* {{{ property result_type_read */ @@ -435,7 +403,6 @@ const mysqli_property_entry mysqli_link_property_entries[] = { {"insert_id", sizeof("insert_id") - 1, link_insert_id_read, NULL}, {"server_info", sizeof("server_info") - 1, link_server_info_read, NULL}, {"server_version", sizeof("server_version") - 1, link_server_version_read, NULL}, - {"stat", sizeof("stat") - 1, link_stat_read, NULL}, {"sqlstate", sizeof("sqlstate") - 1, link_sqlstate_read, NULL}, {"protocol_version",sizeof("protocol_version") - 1, link_protocol_version_read, NULL}, {"thread_id", sizeof("thread_id") - 1, link_thread_id_read, NULL}, diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index 7c36d806bc..d9afc246eb 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -92,8 +92,6 @@ object(mysqli)#%d (%d) { string(%d) "%s" ["server_version"]=> int(%d) - ["stat"]=> - string(%d) "Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> @@ -132,8 +130,6 @@ object(mysqli)#%d (%d) { bool(false) ["server_version"]=> bool(false) - ["stat"]=> - NULL ["sqlstate"]=> bool(false) ["protocol_version"]=> diff --git a/ext/mysqli/tests/bug55859.phpt b/ext/mysqli/tests/bug55859.phpt deleted file mode 100644 index 04467bce24..0000000000 --- a/ext/mysqli/tests/bug55859.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Bug #55859 mysqli->stat property access gives error ---SKIPIF-- -<?php -require_once('skipif.inc'); -require_once('skipifconnectfailure.inc'); -?> ---FILE-- -<?php - require_once("connect.inc"); - - if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { - printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); - } - var_dump(soundex(mysqli_stat($link)) === soundex($link->stat)); - echo "done!"; -?> ---EXPECT-- -bool(true) -done! diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index aa33f17f85..d795853e1f 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -1,7 +1,7 @@ <?php /* Default values are "localhost", "root", - database "stest" and empty password. + database "test" and empty password. Change the MYSQL_TEST environment values if you want to use another configuration */ diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index 27d399be16..dfefb9098c 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -53,7 +53,7 @@ require_once('skipifconnectfailure.inc'); 'set_charset' => true, 'set_opt' => true, 'ssl_set' => true, - 'stat' => true, + 'stat' => true, 'stmt_init' => true, 'store_result' => true, 'thread_safe' => true, @@ -109,7 +109,6 @@ require_once('skipifconnectfailure.inc'); "server_info" => true, "server_version" => true, "sqlstate" => true, - "stat" => true, "thread_id" => true, "warning_count" => true, ); @@ -200,11 +199,6 @@ require_once('skipifconnectfailure.inc'); $mysqli->sqlstate, gettype($mysqli->sqlstate), mysqli_sqlstate($link), gettype(mysqli_sqlstate($link))); - assert(soundex(mysqli_stat($link)) == soundex($mysqli->stat)); - printf("mysqli->stat = '%s'/%s ('%s'/%s)\n", - $mysqli->stat, gettype($mysqli->stat), - mysqli_stat($link), gettype(mysqli_stat($link))); - assert(mysqli_get_host_info($link) === $mysqli->host_info); printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n", $mysqli->host_info, gettype($mysqli->host_info), @@ -288,7 +282,6 @@ mysqli->error = ''/string (''/string) mysqli->field_count = '0'/integer ('0'/integer) mysqli->insert_id = '0'/integer ('0'/integer) mysqli->sqlstate = '00000'/string ('00000'/string) -mysqli->stat = 'Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string ('Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string) mysqli->host_info = '%s'/string ('%s'/string) mysqli->info = ''/NULL (''/NULL) mysqli->thread_id = '%d'/integer ('%d'/integer) diff --git a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt index fe6808e8c0..b7f227a7c2 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt @@ -160,7 +160,6 @@ protocol_version = 'false' server_info = 'false' server_version = 'false' sqlstate = 'false' -stat = 'false' thread_id = 'false' warning_count = 'false' @@ -179,7 +178,6 @@ info = 'false' insert_id = 'false' server_info = 'false' server_version = 'false' -stat = 'false' sqlstate = 'false' protocol_version = 'false' thread_id = 'false' @@ -233,7 +231,6 @@ protocol_version = 'false' server_info = 'false' server_version = 'false' sqlstate = 'false' -stat = 'false' thread_id = 'false' warning_count = 'false' @@ -252,7 +249,6 @@ info = 'false' insert_id = 'false' server_info = 'false' server_version = 'false' -stat = 'false' sqlstate = 'false' protocol_version = 'false' thread_id = 'false' diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt index ad69e3a334..061d03feac 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt @@ -1317,14 +1317,6 @@ isStatic: no isDefault: yes Modifiers: 1 -Inspecting property 'stat' -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isDefault: yes -Modifiers: 1 - Inspecting property 'thread_id' isPublic: yes isPrivate: no @@ -1356,7 +1348,6 @@ Default property 'protocol_version' Default property 'server_info' Default property 'server_version' Default property 'sqlstate' -Default property 'stat' Default property 'thread_id' Default property 'warning_count' done! diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt index 7d96ac9426..f4af490a5b 100644 --- a/ext/mysqli/tests/mysqli_kill.phpt +++ b/ext/mysqli/tests/mysqli_kill.phpt @@ -35,9 +35,6 @@ require_once('skipifconnectfailure.inc'); if ($link->info != 'Records: 6 Duplicates: 0 Warnings: 0') { printf("[008] mysqlnd used to be more verbose and used to support SELECT\n"); } - if ($link->stat != NULL) { - printf("[009] NULL expected because of error.\n"); - } } else { if ($link->info != NULL) { printf("[008] Time for wonders - libmysql has started to support SELECT, change test\n"); @@ -114,8 +111,6 @@ object(mysqli)#%d (%d) { string(%d) "%s" ["server_version"]=> int(%d) - ["stat"]=> - %s ["sqlstate"]=> string(5) "HY000" ["protocol_version"]=> diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt index 32c37b9a14..b12b3650d1 100644 --- a/ext/mysqli/tests/mysqli_real_connect.phpt +++ b/ext/mysqli/tests/mysqli_real_connect.phpt @@ -180,8 +180,6 @@ object(mysqli)#%d (%d) { bool(false) ["server_version"]=> bool(false) - ["stat"]=> - bool(false) ["sqlstate"]=> bool(false) ["protocol_version"]=> |