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/mysqlnd - mysqlnd_ext_plugin.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 23 94 24.5 %
Date: 2014-09-27 Functions: 10 25 40.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   +----------------------------------------------------------------------+
       3             :   | PHP Version 7                                                        |
       4             :   +----------------------------------------------------------------------+
       5             :   | Copyright (c) 2006-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             :   | Authors: Andrey Hristov <andrey@mysql.com>                           |
      16             :   |          Ulf Wendel <uwendel@mysql.com>                              |
      17             :   |          Georg Richter <georg@mysql.com>                             |
      18             :   +----------------------------------------------------------------------+
      19             : */
      20             : 
      21             : /* $Id: mysqlnd.c 318221 2011-10-19 15:04:12Z andrey $ */
      22             : #include "php.h"
      23             : #include "mysqlnd.h"
      24             : #include "mysqlnd_priv.h"
      25             : #include "mysqlnd_result.h"
      26             : #include "mysqlnd_debug.h"
      27             : 
      28             : static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
      29             : static struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_methods;
      30             : static struct st_mysqlnd_stmt_methods * mysqlnd_stmt_methods;
      31             : 
      32             : /* {{{ _mysqlnd_plugin_get_plugin_connection_data */
      33             : PHPAPI void **
      34           0 : _mysqlnd_plugin_get_plugin_connection_data(const MYSQLND * conn, unsigned int plugin_id TSRMLS_DC)
      35             : {
      36           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_connection_data");
      37           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      38           0 :         if (!conn || plugin_id >= mysqlnd_plugin_count()) {
      39           0 :                 return NULL;
      40             :         }
      41           0 :         DBG_RETURN((void *)((char *)conn + sizeof(MYSQLND) + plugin_id * sizeof(void *)));
      42             : }
      43             : /* }}} */
      44             : 
      45             : 
      46             : /* {{{ _mysqlnd_plugin_get_plugin_connection_data_data */
      47             : PHPAPI void **
      48           0 : _mysqlnd_plugin_get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, unsigned int plugin_id TSRMLS_DC)
      49             : {
      50           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_connection_data_data");
      51           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      52           0 :         if (!conn || plugin_id >= mysqlnd_plugin_count()) {
      53           0 :                 return NULL;
      54             :         }
      55           0 :         DBG_RETURN((void *)((char *)conn + sizeof(MYSQLND_CONN_DATA) + plugin_id * sizeof(void *)));
      56             : }
      57             : /* }}} */
      58             : 
      59             : 
      60             : /* {{{ _mysqlnd_plugin_get_plugin_result_data */
      61           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result, unsigned int plugin_id TSRMLS_DC)
      62             : {
      63           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
      64           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      65           0 :         if (!result || plugin_id >= mysqlnd_plugin_count()) {
      66           0 :                 return NULL;
      67             :         }
      68           0 :         DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES) + plugin_id * sizeof(void *)));
      69             : }
      70             : /* }}} */
      71             : 
      72             : 
      73             : /* {{{ _mysqlnd_plugin_get_plugin_result_unbuffered_data */
      74           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, unsigned int plugin_id TSRMLS_DC)
      75             : {
      76           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
      77           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      78           0 :         if (!result || plugin_id >= mysqlnd_plugin_count()) {
      79           0 :                 return NULL;
      80             :         }
      81           0 :         DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_UNBUFFERED) + plugin_id * sizeof(void *)));
      82             : }
      83             : /* }}} */
      84             : 
      85             : 
      86             : /* {{{ _mysqlnd_plugin_get_plugin_result_buffered_data */
      87           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_zval(const MYSQLND_RES_BUFFERED_ZVAL * result, unsigned int plugin_id TSRMLS_DC)
      88             : {
      89           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
      90           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      91           0 :         if (!result || plugin_id >= mysqlnd_plugin_count()) {
      92           0 :                 return NULL;
      93             :         }
      94           0 :         DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_BUFFERED_ZVAL) + plugin_id * sizeof(void *)));
      95             : }
      96             : /* }}} */
      97             : 
      98             : /* {{{ _mysqlnd_plugin_get_plugin_result_buffered_data */
      99           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_RES_BUFFERED_C * result, unsigned int plugin_id TSRMLS_DC)
     100             : {
     101           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
     102           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
     103           0 :         if (!result || plugin_id >= mysqlnd_plugin_count()) {
     104           0 :                 return NULL;
     105             :         }
     106           0 :         DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_BUFFERED_C) + plugin_id * sizeof(void *)));
     107             : }
     108             : /* }}} */
     109             : 
     110             : 
     111             : /* {{{ _mysqlnd_plugin_get_plugin_protocol_data */
     112             : PHPAPI void **
     113           0 : _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id TSRMLS_DC)
     114             : {
     115           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_protocol_data");
     116           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
     117           0 :         if (!protocol || plugin_id >= mysqlnd_plugin_count()) {
     118           0 :                 return NULL;
     119             :         }
     120           0 :         DBG_RETURN((void *)((char *)protocol + sizeof(MYSQLND_PROTOCOL) + plugin_id * sizeof(void *)));
     121             : }
     122             : /* }}} */
     123             : 
     124             : 
     125             : /* {{{ _mysqlnd_plugin_get_plugin_stmt_data */
     126           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id TSRMLS_DC)
     127             : {
     128           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_stmt_data");
     129           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
     130           0 :         if (!stmt || plugin_id >= mysqlnd_plugin_count()) {
     131           0 :                 return NULL;
     132             :         }
     133           0 :         DBG_RETURN((void *)((char *)stmt + sizeof(MYSQLND_STMT) + plugin_id * sizeof(void *)));
     134             : }
     135             : /* }}} */
     136             : 
     137             : 
     138             : /* {{{ _mysqlnd_plugin_get_plugin_net_data */
     139           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id TSRMLS_DC)
     140             : {
     141           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_net_data");
     142           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
     143           0 :         if (!net || plugin_id >= mysqlnd_plugin_count()) {
     144           0 :                 return NULL;
     145             :         }
     146           0 :         DBG_RETURN((void *)((char *)net + sizeof(MYSQLND_NET) + plugin_id * sizeof(void *)));
     147             : }
     148             : /* }}} */
     149             : 
     150             : 
     151             : 
     152             : /* {{{ mysqlnd_conn_get_methods */
     153             : PHPAPI struct st_mysqlnd_conn_methods *
     154        1942 : mysqlnd_conn_get_methods()
     155             : {
     156        1942 :         return mysqlnd_conn_methods;
     157             : }
     158             : /* }}} */
     159             : 
     160             : /* {{{ mysqlnd_conn_set_methods */
     161       20352 : PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods)
     162             : {
     163       20352 :         mysqlnd_conn_methods = methods;
     164       20352 : }
     165             : /* }}} */
     166             : 
     167             : 
     168             : /* {{{ mysqlnd_conn_get_methods */
     169             : PHPAPI struct st_mysqlnd_conn_data_methods *
     170        1942 : mysqlnd_conn_data_get_methods()
     171             : {
     172        1942 :         return mysqlnd_conn_data_methods;
     173             : }
     174             : /* }}} */
     175             : 
     176             : /* {{{ mysqlnd_conn_set_methods */
     177       20352 : PHPAPI void mysqlnd_conn_data_set_methods(struct st_mysqlnd_conn_data_methods * methods)
     178             : {
     179       20352 :         mysqlnd_conn_data_methods = methods;
     180       20352 : }
     181             : /* }}} */
     182             : 
     183             : 
     184             : /* {{{ mysqlnd_result_get_methods */
     185             : PHPAPI struct st_mysqlnd_res_methods *
     186        6007 : mysqlnd_result_get_methods()
     187             : {
     188        6007 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
     189             : }
     190             : /* }}} */
     191             : 
     192             : 
     193             : /* {{{ mysqlnd_result_set_methods */
     194             : PHPAPI void
     195           0 : mysqlnd_result_set_methods(struct st_mysqlnd_res_methods * methods)
     196             : {
     197           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res) = *methods;
     198           0 : }
     199             : /* }}} */
     200             : 
     201             : 
     202             : /* {{{ mysqlnd_result_unbuffered_get_methods */
     203             : PHPAPI struct st_mysqlnd_result_unbuffered_methods *
     204        1985 : mysqlnd_result_unbuffered_get_methods()
     205             : {
     206        1985 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered);
     207             : }
     208             : /* }}} */
     209             : 
     210             : 
     211             : /* {{{ mysqlnd_result_unbuffered_set_methods */
     212             : PHPAPI void
     213           0 : mysqlnd_result_unbuffered_set_methods(struct st_mysqlnd_result_unbuffered_methods * methods)
     214             : {
     215           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered) = *methods;
     216           0 : }
     217             : /* }}} */
     218             : 
     219             : 
     220             : /* {{{ mysqlnd_result_buffered_get_methods */
     221             : PHPAPI struct st_mysqlnd_result_buffered_methods *
     222        3296 : mysqlnd_result_buffered_get_methods()
     223             : {
     224        3296 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered);
     225             : }
     226             : /* }}} */
     227             : 
     228             : 
     229             : /* {{{ mysqlnd_result_buffered_set_methods */
     230             : PHPAPI void
     231           0 : mysqlnd_result_buffered_set_methods(struct st_mysqlnd_result_buffered_methods * methods)
     232             : {
     233           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered) = *methods;
     234           0 : }
     235             : /* }}} */
     236             : 
     237             : 
     238             : /* {{{ mysqlnd_stmt_get_methods */
     239             : PHPAPI struct st_mysqlnd_stmt_methods *
     240        4247 : mysqlnd_stmt_get_methods()
     241             : {
     242        4247 :         return mysqlnd_stmt_methods;
     243             : }
     244             : /* }}} */
     245             : 
     246             : 
     247             : /* {{{ mysqlnd_stmt_set_methods */
     248             : PHPAPI void
     249       20352 : mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods)
     250             : {
     251       20352 :         mysqlnd_stmt_methods = methods;
     252       20352 : }
     253             : /* }}} */
     254             : 
     255             : 
     256             : /* {{{ mysqlnd_protocol_get_methods */
     257             : PHPAPI struct st_mysqlnd_protocol_methods *
     258           0 : mysqlnd_protocol_get_methods()
     259             : {
     260           0 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol);
     261             : }
     262             : /* }}} */
     263             : 
     264             : 
     265             : /* {{{ mysqlnd_protocol_set_methods */
     266             : PHPAPI void
     267           0 : mysqlnd_protocol_set_methods(struct st_mysqlnd_protocol_methods * methods)
     268             : {
     269           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol) = *methods;
     270           0 : }
     271             : /* }}} */
     272             : 
     273             : 
     274             : /* {{{ mysqlnd_net_get_methods */
     275             : PHPAPI struct st_mysqlnd_net_methods *
     276        1942 : mysqlnd_net_get_methods()
     277             : {
     278        1942 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net);
     279             : }
     280             : /* }}} */
     281             : 
     282             : 
     283             : /* {{{ mysqlnd_net_set_methods */
     284             : PHPAPI void
     285           0 : mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods)
     286             : {
     287           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net) = *methods;
     288           0 : }
     289             : /* }}} */
     290             : 
     291             : 
     292             : /*
     293             :  * Local variables:
     294             :  * tab-width: 4
     295             :  * c-basic-offset: 4
     296             :  * End:
     297             :  * vim600: noet sw=4 ts=4 fdm=marker
     298             :  * vim<600: noet sw=4 ts=4
     299             :  */

Generated by: LCOV version 1.10

Generated at Sat, 27 Sep 2014 16:43:12 +0000 (2 days ago)

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