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: 2014-09-19 Functions: 34 34 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10

Generated at Fri, 19 Sep 2014 17:11:10 +0000 (2 days ago)

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