- rename mysql_xdevapi__getXSession => mysql_xdevapi_getSession, and move to mysqlx_session.cc
- then remove mysqlx_x_session.* files (class XSession is obsolete)
the only sessions objects we create && use are of class "Session" from mysqlx_session.cc
related WLs:
WL#10309: DevAPI: Remove XSession, rename NodeSession to Session
WL#10394: Remove concept of NodeSession
- update version number
- add PHP constant MYSQL_XDEVAPI_VERSION_ID (version as long)
- PHP_MYSQL_XDEVAPI_VERSION => MYSQL_XDEVAPI_VERSION, and few other tiny changes
- mysqlx devapi::Session support pooling at connection close + some refactorings
- session reset
- util::fetch_data_object add support for fetching data object from various types
naive implementation:
- mysql_xdevapi\getClient function added
- parser for client options (passed as JSON string)
- auxiliary verify_connection_string function added to check correctness of Uri
- permanently allocable C++ classes added: Connection_pool, Client_state, Client_state_manager (singleton)
- custom allocable PHP class added: mysql_xdevapi\Client plus its data struct Client_object_data
- cleanup_clients() function added, and called from MSHUTDOWN
- phpinfo: merge obsolete partition to 'xmysqlnd' and 'mysqlx' parts into one 'mysql_xdevapi'
- remove unnecessary stuff from phpinfo
- version number 8.0.4 => 8.0.11
- fix module name
- add 'ext/hash' dependency in code
- update package.xml
- in all sources #include "php_api.h" instead of <php.h>
- #undef add_method - it comes from
./Zend/zend_API.h : 560
#define add_method(arg, key, method) add_assoc_function((arg), (key), (method))
- and conflicts with protobufs:
a) linux:
/usr/local/include/google/protobuf/descriptor.pb.h:1738:57: error: macro "add_method" requires 3 arguments, but only 1 given
::google::protobuf::MethodDescriptorProto* add_method();
b) win:
1>t:\protobuf\3.1.0\x86\debug\include\google\protobuf\descriptor.pb.h(1812): warning C4003: not enough actual parameters for macro 'add_method'
1>t:\protobuf\3.1.0\x86\debug\include\google\protobuf\descriptor.pb.h(1812): error C2059: syntax error: '('
probably a conflict C vs C++, and mismatch with #include <inttypes.h> or #define __STDC_FORMAT_MACROS
solved with std::string :->
connector-php-7.1.0/Zend/zend_long.h:60:28: error: expected ')' before 'PRId64'
# define ZEND_LONG_FMT "%" PRId64
^
/connector-php-7.1.0/ext/mysql_xdevapi/php_mysqlx.cc:75:30: note: in expansion of macro 'ZEND_LONG_FMT'
snprintf(buf, sizeof(buf), (ZEND_LONG_FMT), MYSQL_XDEVAPI_G(net_read_timeout));
^
/connector-php-7.1.0/ext/mysql_xdevapi/php_mysqlx.cc:75:80: error: expected ')' before ';' token
snprintf(buf, sizeof(buf), (ZEND_LONG_FMT), MYSQL_XDEVAPI_G(net_read_timeout));
- apply custom (also permanent) allocation to devapi (mysqlx_*) and iterators
- apply C++ casts where required
- embrace all C includes in extern "C" scope
- remove unnecessary extern "C"
- remove unnecessary #ifdefs on __cplusplus
- remove some superfluous 'struct' in var declarations
- some small issues with conversions not allowed in C++ (enum <-> int <-> other enum or const vs non-const)