[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] com =?UTF-8?Q?pecl/database/mysql=5Fxdevapi=3A=20orabug=20=23=32=38=38=30?= =?UTF-8?Q?=32
From:       hery ramilison <mysqlre () php ! net>
Date:       2018-12-21 17:42:03
Message-ID: php-mail-5059736df6e252816179f15622b6a5061149483969 () git ! php ! net
[Download RAW message or body]

Commit:    fc0ca4ea269a1f0a6aaed2a7a22c5dc56b915657
Author:    Darek Slusarczyk <dariusz.slusarczyk@oracle.com>         Fri, 21 Dec 2018 \
                18:42:03 +0100
Parents:   6da3c74ccdb61fa6b5277472b9009b126333c910
Branches:  master

Link:       http://git.php.net/?p=pecl/database/mysql_xdevapi.git;a=commitdiff;h=fc0ca4ea269a1f0a6aaed2a7a22c5dc56b915657


Log:
orabug #28802543 classes: Driver, ExecutionStatus, Expression, and Statement
- remove driver class

more details after research:
a) Driver
looks like we can remove Driver without much problem (there is not much to
preserve / move to other place)

b) ExecutionStatus
it is actually internal class, and should disappear from user's view

c) Expression
this one should stay, but may need some changes
in other connectors there is also some kind of expression creature

d) Statement
it appears in other connectors, although in other form - it should be smaller
/ have less methods

actually we have some fancy mixture of Result classes && ExecutionStatus &&
[Sql]Statement which should be cleaned up to follow DevAPI
it is not trivial task - needs an extra worklog

so for this orabug we only remove Driver class, and close it
then move other things to the new WL

Bugs:
https://bugs.php.net/28802543

Changed paths:
  M  config.m4
  M  config.w32
  D  mysqlx_driver.cc
  D  mysqlx_driver.h
  M  package.xml
  M  php_mysqlx_ex.cc


Diff:
diff --git a/config.m4 b/config.m4
index 49c6c1d..1d8bee6 100644
--- a/config.m4
+++ b/config.m4
@@ -51,7 +51,6 @@ if test "$PHP_MYSQL_XDEVAPI" != "no" || test \
"$PHP_MYSQL_XDEVAPI_ENABLED" = "yes  mysqlx_database_object.cc \
 		mysqlx_doc_result.cc \
 		mysqlx_doc_result_iterator.cc \
-		mysqlx_driver.cc \
 		mysqlx_exception.cc \
 		mysqlx_executable.cc \
 		mysqlx_execution_status.cc \
diff --git a/config.w32 b/config.w32
index 41ad21b..0ef3bf7 100644
--- a/config.w32
+++ b/config.w32
@@ -61,7 +61,6 @@ var mysqlx_devapi_sources = [
 	"mysqlx_database_object.cc",
 	"mysqlx_doc_result.cc",
 	"mysqlx_doc_result_iterator.cc",
-	"mysqlx_driver.cc",
 	"mysqlx_exception.cc",
 	"mysqlx_executable.cc",
 	"mysqlx_execution_status.cc",
diff --git a/mysqlx_driver.cc b/mysqlx_driver.cc
deleted file mode 100644
index 30e608f..0000000
--- a/mysqlx_driver.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-  +----------------------------------------------------------------------+
-  | PHP Version 7                                                        |
-  +----------------------------------------------------------------------+
-  | Copyright (c) 2006-2018 The PHP Group                                |
-  +----------------------------------------------------------------------+
-  | This source file is subject to version 3.01 of the PHP license,      |
-  | that is bundled with this package in the file LICENSE, and is        |
-  | available through the world-wide-web at the following url:           |
-  | http://www.php.net/license/3_01.txt                                  |
-  | If you did not receive a copy of the PHP license and are unable to   |
-  | obtain it through the world-wide-web, please send a note to          |
-  | license@php.net so we can mail you a copy immediately.               |
-  +----------------------------------------------------------------------+
-  | Authors: Andrey Hristov <andrey@php.net>                             |
-  +----------------------------------------------------------------------+
-*/
-#include "php_api.h"
-#include "mysqlnd_api.h"
-#include "xmysqlnd/xmysqlnd.h"
-#include "xmysqlnd/xmysqlnd_priv.h"
-#include "php_mysqlx.h"
-#include "mysqlx_class_properties.h"
-#include "util/object.h"
-
-namespace mysqlx {
-
-namespace devapi {
-
-using namespace drv;
-
-static zend_class_entry *mysqlx_driver_class_entry;
-
-/* {{{ mysqlx_session::__construct */
-MYSQL_XDEVAPI_PHP_METHOD(mysqlx_driver, __construct)
-{
-	UNUSED_INTERNAL_FUNCTION_PARAMETERS();
-}
-/* }}} */
-
-
-/* {{{ mysqlx_driver_methods[] */
-static const zend_function_entry mysqlx_driver_methods[] = {
-	PHP_ME(mysqlx_driver, __construct, nullptr, ZEND_ACC_PRIVATE)
-	{nullptr, nullptr, nullptr}
-};
-/* }}} */
-
-
-/* {{{ mysqlx_register_driver_class */
-void
-mysqlx_register_driver_class(UNUSED_INIT_FUNC_ARGS, zend_object_handlers* \
                /*mysqlx_std_object_handlers*/)
-{
-	zend_class_entry tmp_ce;
-	INIT_NS_CLASS_ENTRY(tmp_ce, "mysql_xdevapi", "Driver", mysqlx_driver_methods);
-	mysqlx_driver_class_entry = zend_register_internal_class(&tmp_ce);
-	mysqlx_driver_class_entry->ce_flags |= ZEND_ACC_FINAL; /* Forbid extension of the \
                driver */
-
-	zend_declare_class_constant_stringl(mysqlx_driver_class_entry, "version", \
sizeof("version") - 1, PHP_MYSQL_XDEVAPI_VERSION, sizeof(PHP_MYSQL_XDEVAPI_VERSION) - \
                1);
-}
-/* }}} */
-
-
-/* {{{ mysqlx_unregister_driver_class */
-void
-mysqlx_unregister_driver_class(UNUSED_SHUTDOWN_FUNC_ARGS)
-{
-}
-/* }}} */
-
-} // namespace devapi
-
-} // namespace mysqlx
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/mysqlx_driver.h b/mysqlx_driver.h
deleted file mode 100644
index c272c23..0000000
--- a/mysqlx_driver.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  +----------------------------------------------------------------------+
-  | PHP Version 7                                                        |
-  +----------------------------------------------------------------------+
-  | Copyright (c) 2006-2018 The PHP Group                                |
-  +----------------------------------------------------------------------+
-  | This source file is subject to version 3.01 of the PHP license,      |
-  | that is bundled with this package in the file LICENSE, and is        |
-  | available through the world-wide-web at the following url:           |
-  | http://www.php.net/license/3_01.txt                                  |
-  | If you did not receive a copy of the PHP license and are unable to   |
-  | obtain it through the world-wide-web, please send a note to          |
-  | license@php.net so we can mail you a copy immediately.               |
-  +----------------------------------------------------------------------+
-  | Authors: Andrey Hristov <andrey@php.net>                             |
-  +----------------------------------------------------------------------+
-*/
-#ifndef MYSQLX_DRIVER_H
-#define MYSQLX_DRIVER_H
-
-namespace mysqlx {
-
-namespace devapi {
-
-void mysqlx_register_driver_class(INIT_FUNC_ARGS, zend_object_handlers * \
                mysqlx_std_object_handlers);
-void mysqlx_unregister_driver_class(SHUTDOWN_FUNC_ARGS);
-
-} // namespace devapi
-
-} // namespace mysqlx
-
-#endif /* MYSQLX_DRIVER_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/package.xml b/package.xml
index d98b20b..36bb1c2 100644
--- a/package.xml
+++ b/package.xml
@@ -123,8 +123,6 @@ The X DevAPI introduces a new, modern and easy-to-learn way to \
work with your da  <file name="mysqlx_doc_result.h" role="src" />
    <file name="mysqlx_doc_result_iterator.cc" role="src" />
    <file name="mysqlx_doc_result_iterator.h" role="src" />
-   <file name="mysqlx_driver.cc" role="src" />
-   <file name="mysqlx_driver.h" role="src" />
    <file name="mysqlx_enum_n_def.h" role="src" />
    <file name="mysqlx_exception.cc" role="src" />
    <file name="mysqlx_exception.h" role="src" />
diff --git a/php_mysqlx_ex.cc b/php_mysqlx_ex.cc
index 07a2f5f..3c0ef1b 100755
--- a/php_mysqlx_ex.cc
+++ b/php_mysqlx_ex.cc
@@ -26,7 +26,6 @@
 #include "mysqlx_crud_operation_sortable.h"
 #include "mysqlx_database_object.h"
 #include "mysqlx_schema_object.h"
-#include "mysqlx_driver.h"
 #include "mysqlx_enum_n_def.h"
 #include "mysqlx_session.h"
 #include "mysqlx_executable.h"
@@ -110,8 +109,6 @@ mysqlx_minit_classes(INIT_FUNC_ARGS)
 	mysqlx_register_execution_status_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers);  \
mysqlx_register_expression_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers);  
-	mysqlx_register_driver_class(INIT_FUNC_ARGS_PASSTHRU, &mysqlx_std_object_handlers);
-
 	mysqlx_register_x_session_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers);  mysqlx_register_session_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers);  mysqlx_register_client_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers); @@ -164,6 +161,9 @@ \
mysqlx_minit_classes(INIT_FUNC_ARGS)  \
mysqlx_register_data_row_class(INIT_FUNC_ARGS_PASSTHRU, &mysqlx_std_object_handlers); \
mysqlx_register_message__data_fetch_done_class(INIT_FUNC_ARGS_PASSTHRU, \
&mysqlx_std_object_handlers);  
+	// extension consts
+	REGISTER_STRING_CONSTANT("MYSQLX_VERSION", PHP_MYSQL_XDEVAPI_VERSION, CONST_CS | \
CONST_PERSISTENT); +
 	/* xmysqlnd_real_connect flags */
 	REGISTER_LONG_CONSTANT("MYSQLX_CLIENT_SSL", CLIENT_SSL, CONST_CS | \
CONST_PERSISTENT);  
@@ -265,7 +265,6 @@ mysqlx_mshutdown_classes(SHUTDOWN_FUNC_ARGS)
 	mysqlx_unregister_session_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 	mysqlx_unregister_x_session_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 
-	mysqlx_unregister_driver_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 	mysqlx_unregister_expression_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 	mysqlx_unregister_execution_status_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 	mysqlx_unregister_exception_class(SHUTDOWN_FUNC_ARGS_PASSTHRU);


--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic