]> granicus.if.org Git - php/commitdiff
Allow overloading of mysqlnd_result_meta_init().
authorAndrey Hristov <andrey@php.net>
Fri, 14 May 2010 15:11:56 +0000 (15:11 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 14 May 2010 15:11:56 +0000 (15:11 +0000)
Add free space for future hooks.

ext/mysqlnd/mysqlnd_result.c
ext/mysqlnd/mysqlnd_structs.h

index af8474e43a55bc8f001bc0ba860140ec74678083..d7729299e98358b0cb46a8ac800e19fe3baa6f9a 100644 (file)
@@ -322,7 +322,7 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND
                result->meta = NULL;
        }
 
-       result->meta = mysqlnd_result_meta_init(result->field_count, result->persistent TSRMLS_CC);
+       result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC);
 
        /* 1. Read all fields metadata */
 
@@ -1613,7 +1613,8 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_res)
        MYSQLND_METHOD(mysqlnd_res, free_buffered_data),
        MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data),
 
-       NULL /* row_decoder */
+       NULL /* row_decoder */,
+       mysqlnd_result_meta_init
 MYSQLND_CLASS_METHODS_END;
 
 
index b7b72dd54525800b23124d231c2975d0df6e22c1..0a2c928495f22116d2a7f073269445ce2fdf688b 100644 (file)
@@ -277,6 +277,12 @@ struct st_mysqlnd_net_methods
        func_mysqlnd_net__free_contents free_contents;
        func_mysqlnd_net__enable_ssl enable_ssl;
        func_mysqlnd_net__disable_ssl disable_ssl;
+
+       void * unused1;
+       void * unused2;
+       void * unused3;
+       void * unused4;
+       void * unused5;
 };
 
 
@@ -318,6 +324,12 @@ struct st_mysqlnd_protocol_methods
        func_mysqlnd_protocol__get_stats_packet get_stats_packet;
        func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet;
        func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet;
+
+       void * unused1;
+       void * unused2;
+       void * unused3;
+       void * unused4;
+       void * unused5;
 };
 
 
@@ -507,6 +519,8 @@ typedef void                                (*func_mysqlnd_res__row_decoder)(MYSQLND_MEMORY_POOL_CHUNK * row
                                                                        zend_bool as_unicode, zend_bool as_int_or_float,
                                                                        MYSQLND_STATS * stats TSRMLS_DC);
 
+typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC);
+
 struct st_mysqlnd_res_methods
 {
        mysqlnd_fetch_row_func  fetch_row;
@@ -541,6 +555,14 @@ struct st_mysqlnd_res_methods
 
        /* for decoding - binary or text protocol */
        func_mysqlnd_res__row_decoder row_decoder;
+
+       func_mysqlnd_res__result_meta_init result_meta_init;
+
+       void * unused1;
+       void * unused2;
+       void * unused3;
+       void * unused4;
+       void * unused5;
 };