PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/mysqli - mysqli_prop.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 110 124 88.7 %
Date: 2016-04-27 Functions: 34 34 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   +----------------------------------------------------------------------+
       3             :   | PHP Version 7                                                        |
       4             :   +----------------------------------------------------------------------+
       5             :   | Copyright (c) 1997-2016 The PHP Group                                |
       6             :   +----------------------------------------------------------------------+
       7             :   | This source file is subject to version 3.01 of the PHP license,      |
       8             :   | that is bundled with this package in the file LICENSE, and is        |
       9             :   | available through the world-wide-web at the following url:           |
      10             :   | http://www.php.net/license/3_01.txt                                  |
      11             :   | If you did not receive a copy of the PHP license and are unable to   |
      12             :   | obtain it through the world-wide-web, please send a note to          |
      13             :   | license@php.net so we can mail you a copy immediately.               |
      14             :   +----------------------------------------------------------------------+
      15             :   | Author: Georg Richter <georg@php.net>                                |
      16             :   |         Andrey Hristov <andrey@php.net>                              |
      17             :   +----------------------------------------------------------------------+
      18             : */
      19             : 
      20             : #ifdef HAVE_CONFIG_H
      21             : #include "config.h"
      22             : #endif
      23             : 
      24             : #include <signal.h>
      25             : 
      26             : #include "php.h"
      27             : #include "php_ini.h"
      28             : #include "ext/standard/info.h"
      29             : #include "php_mysqli_structs.h"
      30             : #include "mysqli_priv.h"
      31             : 
      32             : #define CHECK_STATUS(value) \
      33             :         if (!obj->ptr || ((MYSQLI_RESOURCE *)obj->ptr)->status < value ) { \
      34             :                 php_error_docref(NULL, E_WARNING, "Property access is not allowed yet"); \
      35             :                 ZVAL_NULL(retval); \
      36             :                 return retval; \
      37             :         } \
      38             : 
      39             : #define MYSQLI_GET_MYSQL(statusval) \
      40             : MYSQL *p; \
      41             : if (!obj->ptr || !(MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr) { \
      42             :         php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(obj->zo.ce->name));\
      43             :         ZVAL_NULL(retval);\
      44             :         return retval; \
      45             : } else { \
      46             :         CHECK_STATUS(statusval);\
      47             :     p = (MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->mysql;\
      48             : }
      49             : 
      50             : #define MYSQLI_GET_RESULT(statusval) \
      51             : MYSQL_RES *p; \
      52             : if (!obj->ptr) { \
      53             :         php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(obj->zo.ce->name));\
      54             :         ZVAL_NULL(retval);\
      55             :         return retval; \
      56             : } else { \
      57             :         CHECK_STATUS(statusval);\
      58             :         p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; \
      59             : }
      60             : 
      61             : 
      62             : #define MYSQLI_GET_STMT(statusval) \
      63             : MYSQL_STMT *p; \
      64             : if (!obj->ptr) { \
      65             :         php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(obj->zo.ce->name));\
      66             :         ZVAL_NULL(retval);\
      67             :         return retval; \
      68             : } else { \
      69             :         CHECK_STATUS(statusval);\
      70             :         p = (MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->stmt;\
      71             : }
      72             : 
      73             : #define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type, __ret_type_sprint_mod)\
      74             : static zval *__func(mysqli_object *obj, zval *retval) \
      75             : {\
      76             :         __ret_type l;\
      77             :         __get_type;\
      78             :         if (!p) {\
      79             :                 ZVAL_NULL(retval);\
      80             :         } else {\
      81             :                 l = (__ret_type)__int_func(p);\
      82             :                 if (l < ZEND_LONG_MAX) {\
      83             :                         ZVAL_LONG(retval, (zend_long) l);\
      84             :                 } else { \
      85             :                         ZVAL_NEW_STR(retval, strpprintf(0, __ret_type_sprint_mod, l)); \
      86             :                 } \
      87             :         }\
      88             :         return retval;\
      89             : }
      90             : 
      91             : #define MYSQLI_MAP_PROPERTY_FUNC_STRING(__func, __int_func, __get_type)\
      92             : static zval *__func(mysqli_object *obj, zval *retval)\
      93             : {\
      94             :         char *c;\
      95             :         __get_type;\
      96             :         if (!p) {\
      97             :                 ZVAL_NULL(retval);\
      98             :         } else {\
      99             :                 c = (char *)__int_func(p);\
     100             :                 if (!c) {\
     101             :                         ZVAL_NULL(retval);\
     102             :                 } else {\
     103             :                         ZVAL_STRING(retval, c);\
     104             :                 }\
     105             :         }\
     106             :         return retval; \
     107             : }
     108             : 
     109             : /* {{{ property link_client_version_read */
     110          18 : static zval *link_client_version_read(mysqli_object *obj, zval *retval)
     111             : {
     112          18 :         ZVAL_LONG(retval, MYSQL_VERSION_ID);
     113          18 :         return retval;
     114             : }
     115             : /* }}} */
     116             : 
     117             : /* {{{ property link_client_info_read */
     118          17 : static zval *link_client_info_read(mysqli_object *obj, zval *retval)
     119             : {
     120          17 :         CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
     121          12 :         ZVAL_STRING(retval, MYSQL_SERVER_VERSION);
     122           6 :         return retval;
     123             : }
     124             : /* }}} */
     125             : 
     126             : /* {{{ property link_connect_errno_read */
     127          17 : static zval *link_connect_errno_read(mysqli_object *obj, zval *retval)
     128             : {
     129          17 :         ZVAL_LONG(retval, (zend_long)MyG(error_no));
     130          17 :         return retval;
     131             : }
     132             : /* }}} */
     133             : 
     134             : /* {{{ property link_connect_error_read */
     135          17 : static zval *link_connect_error_read(mysqli_object *obj, zval *retval)
     136             : {
     137          17 :         if (MyG(error_msg)) {
     138          20 :                 ZVAL_STRING(retval, MyG(error_msg));
     139             :         } else {
     140           7 :                 ZVAL_NULL(retval);
     141             :         }
     142          17 :         return retval;
     143             : }
     144             : /* }}} */
     145             : 
     146             : /* {{{ property link_affected_rows_read */
     147          31 : static zval *link_affected_rows_read(mysqli_object *obj, zval *retval)
     148             : {
     149             :         MY_MYSQL *mysql;
     150             :         my_ulonglong rc;
     151             : 
     152          31 :         CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
     153             : 
     154          19 :         mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     155             : 
     156          19 :         if (!mysql) {
     157           0 :                 ZVAL_NULL(retval);
     158             :         } else {
     159          19 :                 CHECK_STATUS(MYSQLI_STATUS_VALID);
     160             : 
     161          17 :                 rc = mysql_affected_rows(mysql->mysql);
     162             : 
     163          17 :                 if (rc == (my_ulonglong) -1) {
     164           2 :                         ZVAL_LONG(retval, -1);
     165           2 :                         return retval;
     166             :                 }
     167             : 
     168          15 :                 if (rc < ZEND_LONG_MAX) {
     169          15 :                         ZVAL_LONG(retval, (zend_long) rc);
     170             :                 } else {
     171           0 :                         ZVAL_NEW_STR(retval, strpprintf(0, MYSQLI_LLU_SPEC, rc));
     172             :                 }
     173             :         }
     174          15 :         return retval;
     175             : }
     176             : /* }}} */
     177             : 
     178             : /* {{{ property link_error_list_read */
     179          10 : static zval *link_error_list_read(mysqli_object *obj, zval *retval)
     180             : {
     181             :         MY_MYSQL *mysql;
     182             : 
     183          10 :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     184             : 
     185           4 :         mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     186             : 
     187           4 :         array_init(retval);
     188           4 :         if (mysql) {
     189             : #if defined(MYSQLI_USE_MYSQLND)
     190           4 :                 if (mysql->mysql->data->error_info->error_list) {
     191             :                         MYSQLND_ERROR_LIST_ELEMENT * message;
     192             :                         zend_llist_position pos;
     193           9 :                         for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(mysql->mysql->data->error_info->error_list, &pos);
     194             :                                  message;
     195           1 :                                  message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(mysql->mysql->data->error_info->error_list, &pos))
     196             :                         {
     197             :                                 zval single_error;
     198           1 :                                 array_init(&single_error);
     199           1 :                                 add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, message->error_no);
     200           1 :                                 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
     201           1 :                                 add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, message->error);
     202           1 :                                 add_next_index_zval(retval, &single_error);
     203             :                         }
     204             :                 }
     205             : #else
     206             :                 if (mysql_errno(mysql->mysql)) {
     207             :                         zval single_error;
     208             :                         array_init(&single_error);
     209             :                         add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_errno(mysql->mysql));
     210             :                         add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_sqlstate(mysql->mysql));
     211             :                         add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_error(mysql->mysql));
     212             :                         add_next_index_zval(retval, &single_error);
     213             :                 }
     214             : #endif
     215             :         }
     216             : 
     217           4 :         return retval;
     218             : }
     219             : /* }}} */
     220             : 
     221             : /* link properties */
     222          42 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_errno_read, mysql_errno, MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED), zend_ulong, ZEND_ULONG_FMT)
     223          50 : MYSQLI_MAP_PROPERTY_FUNC_STRING(link_error_read, mysql_error, MYSQLI_GET_MYSQL(MYSQLI_STATUS_INITIALIZED))
     224          18 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_field_count_read, mysql_field_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     225          22 : MYSQLI_MAP_PROPERTY_FUNC_STRING(link_host_info_read, mysql_get_host_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
     226          20 : MYSQLI_MAP_PROPERTY_FUNC_STRING(link_info_read, mysql_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
     227          33 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_insert_id_read, mysql_insert_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
     228          17 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_protocol_version_read, mysql_get_proto_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     229          24 : MYSQLI_MAP_PROPERTY_FUNC_STRING(link_server_info_read, mysql_get_server_info, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
     230          23 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_server_version_read, mysql_get_server_version, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     231          24 : MYSQLI_MAP_PROPERTY_FUNC_STRING(link_sqlstate_read, mysql_sqlstate, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID))
     232          29 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     233          21 : MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     234             : 
     235             : /* {{{ property link_stat_read */
     236          13 : static zval *link_stat_read(mysqli_object *obj, zval *retval)
     237             : {
     238             :         MY_MYSQL *mysql;
     239             : 
     240          13 :         ZVAL_NULL(retval);
     241             : 
     242             : #if defined(MYSQLI_USE_MYSQLND)
     243          13 :         CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
     244             : #else
     245             :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     246             : #endif
     247             : 
     248           8 :         mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     249             : 
     250           8 :         if (mysql) {
     251             : #if defined(MYSQLI_USE_MYSQLND)
     252             :                 zend_string * stat_msg;
     253           8 :                 if (mysqlnd_stat(mysql->mysql, &stat_msg) == PASS) {
     254           5 :                         ZVAL_STR(retval, stat_msg);
     255             :                 }
     256             : #else
     257             :                 char * stat_msg;
     258             :                 if ((stat_msg = (char *)mysql_stat(mysql->mysql))) {
     259             :                         ZVAL_STRING(retval, stat_msg);
     260             :                 }
     261             : #endif
     262             :         }
     263           8 :         return retval;
     264             : }
     265             : /* }}} */
     266             : 
     267             : /* result properties */
     268             : 
     269             : /* {{{ property result_type_read */
     270           6 : static zval *result_type_read(mysqli_object *obj, zval *retval)
     271             : {
     272             :         MYSQL_RES *p;
     273             : 
     274           6 :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     275           5 :         p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     276             : 
     277           5 :         if (!p) {
     278           0 :                 ZVAL_NULL(retval);
     279             :         } else {
     280           5 :                 ZVAL_LONG(retval, mysqli_result_is_unbuffered(p) ? MYSQLI_USE_RESULT:MYSQLI_STORE_RESULT);
     281             :         }
     282           5 :         return retval;
     283             : }
     284             : /* }}} */
     285             : 
     286             : /* {{{ property result_lengths_read */
     287           9 : static zval *result_lengths_read(mysqli_object *obj, zval *retval)
     288             : {
     289             :         MYSQL_RES *p;
     290             : #if defined(MYSQLI_USE_MYSQLND)
     291             :         const size_t *ret;
     292             : #else
     293             :         const zend_ulong *ret;
     294             : #endif
     295             :         uint field_count;
     296             : 
     297           9 :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     298           7 :         p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     299           7 :         field_count = mysql_num_fields(p);
     300           9 :         if (!p || !field_count || !(ret = mysql_fetch_lengths(p))) {
     301           2 :                 ZVAL_NULL(retval);
     302             :         } else {
     303             :                 zend_ulong i;
     304             : 
     305           5 :                 array_init(retval);
     306             : 
     307          15 :                 for (i = 0; i < field_count; i++) {
     308          10 :                         add_index_long(retval, i, ret[i]);
     309             :                 }
     310             :         }
     311           7 :         return retval;
     312             : }
     313             : /* }}} */
     314             : 
     315           6 : MYSQLI_MAP_PROPERTY_FUNC_LONG(result_current_field_read, mysql_field_tell, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     316          11 : MYSQLI_MAP_PROPERTY_FUNC_LONG(result_field_count_read, mysql_num_fields, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     317           9 : MYSQLI_MAP_PROPERTY_FUNC_LONG(result_num_rows_read, mysql_num_rows, MYSQLI_GET_RESULT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
     318             : 
     319             : /* statement properties */
     320             : 
     321             : /* {{{ property stmt_id_read */
     322           4 : static zval *stmt_id_read(mysqli_object *obj, zval *retval)
     323             : {
     324             :         MY_STMT *p;
     325             : 
     326           4 :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     327             : 
     328           4 :         p = (MY_STMT*)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     329             : 
     330           4 :         if (!p) {
     331           0 :                 ZVAL_NULL(retval);
     332             :         } else {
     333           4 :                 ZVAL_LONG(retval, mysqli_stmt_get_id(p->stmt));
     334             :         }
     335           4 :         return retval;
     336             : }
     337             : /* }}} */
     338             : 
     339             : /* {{{ property stmt_affected_rows_read */
     340           6 : static zval *stmt_affected_rows_read(mysqli_object *obj, zval *retval)
     341             : {
     342             :         MY_STMT *p;
     343             :         my_ulonglong rc;
     344             : 
     345           6 :         CHECK_STATUS(MYSQLI_STATUS_VALID);
     346             : 
     347           4 :         p = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     348             : 
     349           4 :         if (!p) {
     350           0 :                 ZVAL_NULL(retval);
     351             :         } else {
     352           4 :                 rc = mysql_stmt_affected_rows(p->stmt);
     353             : 
     354           4 :                 if (rc == (my_ulonglong) -1) {
     355           0 :                         ZVAL_LONG(retval, -1);
     356           0 :                         return retval;
     357             :                 }
     358             : 
     359           4 :                 if (rc < ZEND_LONG_MAX) {
     360           4 :                         ZVAL_LONG(retval, (zend_long) rc);
     361             :                 } else {
     362           0 :                         ZVAL_NEW_STR(retval, strpprintf(0, MYSQLI_LLU_SPEC, rc));
     363             :                 }
     364             :         }
     365           4 :         return retval;
     366             : }
     367             : /* }}} */
     368             : 
     369             : /* {{{ property stmt_error_list_read */
     370           3 : static zval *stmt_error_list_read(mysqli_object *obj, zval *retval)
     371             : {
     372             :         MY_STMT * stmt;
     373             : 
     374           3 :         CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);
     375             : 
     376           3 :         stmt = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
     377           3 :         array_init(retval);
     378           3 :         if (stmt && stmt->stmt) {
     379             : #if defined(MYSQLI_USE_MYSQLND)
     380           3 :                 if (stmt->stmt->data && stmt->stmt->data->error_info->error_list) {
     381             :                         MYSQLND_ERROR_LIST_ELEMENT * message;
     382             :                         zend_llist_position pos;
     383           6 :                         for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(stmt->stmt->data->error_info->error_list, &pos);
     384             :                                  message;
     385           0 :                                  message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(stmt->stmt->data->error_info->error_list, &pos))
     386             :                         {
     387             :                                 zval single_error;
     388           0 :                                 array_init(&single_error);
     389           0 :                                 add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, message->error_no);
     390           0 :                                 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
     391           0 :                                 add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, message->error);
     392           0 :                                 add_next_index_zval(retval, &single_error);
     393             :                         }
     394             :                 }
     395             : #else
     396             :                 if (mysql_stmt_errno(stmt->stmt)) {
     397             :                         zval single_error;
     398             :                         array_init(&single_error);
     399             :                         add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_stmt_errno(stmt->stmt));
     400             :                         add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_stmt_sqlstate(stmt->stmt));
     401             :                         add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_stmt_error(stmt->stmt));
     402             :                         add_next_index_zval(retval, &single_error);
     403             :                 }
     404             : #endif
     405             :         }
     406           3 :         return retval;
     407             : }
     408             : /* }}} */
     409             : 
     410           5 : MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_insert_id_read, mysql_stmt_insert_id, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
     411           3 : MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_num_rows_read, mysql_stmt_num_rows, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), my_ulonglong, MYSQLI_LLU_SPEC)
     412           9 : MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_param_count_read, mysql_stmt_param_count, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     413           4 : MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_field_count_read, mysql_stmt_field_count, MYSQLI_GET_STMT(MYSQLI_STATUS_VALID), zend_ulong, ZEND_ULONG_FMT)
     414           4 : MYSQLI_MAP_PROPERTY_FUNC_LONG(stmt_errno_read, mysql_stmt_errno, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED), zend_ulong, ZEND_ULONG_FMT)
     415           6 : MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_error_read, mysql_stmt_error, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED))
     416           6 : MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_sqlstate_read, mysql_stmt_sqlstate, MYSQLI_GET_STMT(MYSQLI_STATUS_INITIALIZED))
     417             : 
     418             : /* }}} */
     419             : const mysqli_property_entry mysqli_link_property_entries[] = {
     420             :         {"affected_rows",     sizeof("affected_rows") - 1,  link_affected_rows_read, NULL},
     421             :         {"client_info",       sizeof("client_info") - 1,            link_client_info_read, NULL},
     422             :         {"client_version",    sizeof("client_version") - 1, link_client_version_read, NULL},
     423             :         {"connect_errno",     sizeof("connect_errno") - 1,  link_connect_errno_read, NULL},
     424             :         {"connect_error",     sizeof("connect_error") - 1,  link_connect_error_read, NULL},
     425             :         {"errno",                     sizeof("errno") - 1,                  link_errno_read, NULL},
     426             :         {"error",                     sizeof("error") - 1,                  link_error_read, NULL},
     427             :         {"error_list",                sizeof("error_list") - 1,             link_error_list_read, NULL},
     428             :         {"field_count",               sizeof("field_count") - 1,            link_field_count_read, NULL},
     429             :         {"host_info",         sizeof("host_info") - 1,              link_host_info_read, NULL},
     430             :         {"info",                      sizeof("info") - 1,                           link_info_read, NULL},
     431             :         {"insert_id",         sizeof("insert_id") - 1,              link_insert_id_read, NULL},
     432             :         {"server_info",               sizeof("server_info") - 1,            link_server_info_read, NULL},
     433             :         {"server_version",    sizeof("server_version") - 1, link_server_version_read, NULL},
     434             :         {"stat",                      sizeof("stat") - 1,                           link_stat_read, NULL},
     435             :         {"sqlstate",          sizeof("sqlstate") - 1,                       link_sqlstate_read, NULL},
     436             :         {"protocol_version",sizeof("protocol_version") - 1, link_protocol_version_read, NULL},
     437             :         {"thread_id",         sizeof("thread_id") - 1,              link_thread_id_read, NULL},
     438             :         {"warning_count",     sizeof("warning_count") - 1,  link_warning_count_read, NULL},
     439             :         {NULL, 0, NULL, NULL}
     440             : };
     441             : 
     442             : 
     443             : const mysqli_property_entry mysqli_result_property_entries[] = {
     444             :         {"current_field",sizeof("current_field")-1, result_current_field_read, NULL},
     445             :         {"field_count", sizeof("field_count") - 1,  result_field_count_read, NULL},
     446             :         {"lengths",   sizeof("lengths") - 1,                result_lengths_read, NULL},
     447             :         {"num_rows",  sizeof("num_rows") - 1,               result_num_rows_read, NULL},
     448             :         {"type",              sizeof("type") - 1,                   result_type_read, NULL},
     449             :         {NULL, 0, NULL, NULL}
     450             : };
     451             : 
     452             : const mysqli_property_entry mysqli_stmt_property_entries[] = {
     453             :         {"affected_rows", sizeof("affected_rows")-1,stmt_affected_rows_read, NULL},
     454             :         {"insert_id", sizeof("insert_id") - 1,      stmt_insert_id_read, NULL},
     455             :         {"num_rows",  sizeof("num_rows") - 1,       stmt_num_rows_read, NULL},
     456             :         {"param_count", sizeof("param_count") - 1,  stmt_param_count_read, NULL},
     457             :         {"field_count", sizeof("field_count") - 1,  stmt_field_count_read, NULL},
     458             :         {"errno",             sizeof("errno") - 1,          stmt_errno_read, NULL},
     459             :         {"error",             sizeof("error") - 1,          stmt_error_read, NULL},
     460             :         {"error_list",        sizeof("error_list") - 1,     stmt_error_list_read, NULL},
     461             :         {"sqlstate",  sizeof("sqlstate") - 1,               stmt_sqlstate_read, NULL},
     462             :         {"id",                        sizeof("id") - 1,                     stmt_id_read, NULL},
     463             :         {NULL, 0, NULL, NULL}
     464             : };
     465             : 
     466             : /*
     467             :  * Local variables:
     468             :  * tab-width: 4
     469             :  * c-basic-offset: 4
     470             :  * End:
     471             :  * vim600: noet sw=4 ts=4 fdm=marker
     472             :  * vim<600: noet sw=4 ts=4
     473             :  */

Generated by: LCOV version 1.10

Generated at Wed, 27 Apr 2016 15:51:42 +0000 (5 days ago)

Copyright © 2005-2016 The PHP Group
All rights reserved.