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: 19 66 28.8 %
Date: 2014-04-19 Functions: 8 18 44.4 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   +----------------------------------------------------------------------+
       3             :   | PHP Version 5                                                        |
       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_protocol_data */
      74             : PHPAPI void **
      75           0 : _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id TSRMLS_DC)
      76             : {
      77           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_protocol_data");
      78           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      79           0 :         if (!protocol || plugin_id >= mysqlnd_plugin_count()) {
      80           0 :                 return NULL;
      81             :         }
      82           0 :         DBG_RETURN((void *)((char *)protocol + sizeof(MYSQLND_PROTOCOL) + plugin_id * sizeof(void *)));
      83             : }
      84             : /* }}} */
      85             : 
      86             : 
      87             : /* {{{ _mysqlnd_plugin_get_plugin_stmt_data */
      88           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id TSRMLS_DC)
      89             : {
      90           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_stmt_data");
      91           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
      92           0 :         if (!stmt || plugin_id >= mysqlnd_plugin_count()) {
      93           0 :                 return NULL;
      94             :         }
      95           0 :         DBG_RETURN((void *)((char *)stmt + sizeof(MYSQLND_STMT) + plugin_id * sizeof(void *)));
      96             : }
      97             : /* }}} */
      98             : 
      99             : 
     100             : /* {{{ _mysqlnd_plugin_get_plugin_net_data */
     101           0 : PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id TSRMLS_DC)
     102             : {
     103           0 :         DBG_ENTER("_mysqlnd_plugin_get_plugin_net_data");
     104           0 :         DBG_INF_FMT("plugin_id=%u", plugin_id);
     105           0 :         if (!net || plugin_id >= mysqlnd_plugin_count()) {
     106           0 :                 return NULL;
     107             :         }
     108           0 :         DBG_RETURN((void *)((char *)net + sizeof(MYSQLND_NET) + plugin_id * sizeof(void *)));
     109             : }
     110             : /* }}} */
     111             : 
     112             : 
     113             : 
     114             : /* {{{ mysqlnd_conn_get_methods */
     115             : PHPAPI struct st_mysqlnd_conn_methods *
     116        1906 : mysqlnd_conn_get_methods()
     117             : {
     118        1906 :         return mysqlnd_conn_methods;
     119             : }
     120             : /* }}} */
     121             : 
     122             : /* {{{ mysqlnd_conn_set_methods */
     123       20133 : PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods)
     124             : {
     125       20133 :         mysqlnd_conn_methods = methods;
     126       20133 : }
     127             : /* }}} */
     128             : 
     129             : 
     130             : /* {{{ mysqlnd_conn_get_methods */
     131             : PHPAPI struct st_mysqlnd_conn_data_methods *
     132        1906 : mysqlnd_conn_data_get_methods()
     133             : {
     134        1906 :         return mysqlnd_conn_data_methods;
     135             : }
     136             : /* }}} */
     137             : 
     138             : /* {{{ mysqlnd_conn_set_methods */
     139       20133 : PHPAPI void mysqlnd_conn_data_set_methods(struct st_mysqlnd_conn_data_methods * methods)
     140             : {
     141       20133 :         mysqlnd_conn_data_methods = methods;
     142       20133 : }
     143             : /* }}} */
     144             : 
     145             : 
     146             : /* {{{ mysqlnd_result_get_methods */
     147             : PHPAPI struct st_mysqlnd_res_methods *
     148        5998 : mysqlnd_result_get_methods()
     149             : {
     150        5998 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
     151             : }
     152             : /* }}} */
     153             : 
     154             : 
     155             : /* {{{ mysqlnd_result_set_methods */
     156             : PHPAPI void
     157           0 : mysqlnd_result_set_methods(struct st_mysqlnd_res_methods * methods)
     158             : {
     159           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res) = *methods;
     160           0 : }
     161             : /* }}} */
     162             : 
     163             : 
     164             : /* {{{ mysqlnd_stmt_get_methods */
     165             : PHPAPI struct st_mysqlnd_stmt_methods *
     166        4240 : mysqlnd_stmt_get_methods()
     167             : {
     168        4240 :         return mysqlnd_stmt_methods;
     169             : }
     170             : /* }}} */
     171             : 
     172             : 
     173             : /* {{{ mysqlnd_stmt_set_methods */
     174             : PHPAPI void
     175       20133 : mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods)
     176             : {
     177       20133 :         mysqlnd_stmt_methods = methods;
     178       20133 : }
     179             : /* }}} */
     180             : 
     181             : 
     182             : /* {{{ mysqlnd_protocol_get_methods */
     183             : PHPAPI struct st_mysqlnd_protocol_methods *
     184           0 : mysqlnd_protocol_get_methods()
     185             : {
     186           0 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol);
     187             : }
     188             : /* }}} */
     189             : 
     190             : 
     191             : /* {{{ mysqlnd_protocol_set_methods */
     192             : PHPAPI void
     193           0 : mysqlnd_protocol_set_methods(struct st_mysqlnd_protocol_methods * methods)
     194             : {
     195           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol) = *methods;
     196           0 : }
     197             : /* }}} */
     198             : 
     199             : 
     200             : /* {{{ mysqlnd_net_get_methods */
     201             : PHPAPI struct st_mysqlnd_net_methods *
     202        1906 : mysqlnd_net_get_methods()
     203             : {
     204        1906 :         return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net);
     205             : }
     206             : /* }}} */
     207             : 
     208             : 
     209             : /* {{{ mysqlnd_net_set_methods */
     210             : PHPAPI void
     211           0 : mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods)
     212             : {
     213           0 :         MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net) = *methods;
     214           0 : }
     215             : /* }}} */
     216             : 
     217             : 
     218             : 
     219             : /*
     220             :  * Local variables:
     221             :  * tab-width: 4
     222             :  * c-basic-offset: 4
     223             :  * End:
     224             :  * vim600: noet sw=4 ts=4 fdm=marker
     225             :  * vim<600: noet sw=4 ts=4
     226             :  */

Generated by: LCOV version 1.10

Generated at Sun, 20 Apr 2014 03:52:11 +0000 (3 days ago)

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