1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Put all jar files in the SHARE directory (was PLUGIN)

modified:   sql/mysqld.h
    modified:   storage/connect/CMakeLists.txt
    modified:   storage/connect/javaconn.cpp
    modified:   storage/connect/mycat.cc
    modified:   storage/connect/mycat.h

- Get a handled on a not pooled client
  This to avoid a .50 delay when closing
    modified:   storage/connect/cmgoconn.cpp
    modified:   storage/connect/cmgoconn.h

- Allow FIELD_FORMAT options for DECIMAL type
    modified:   storage/connect/tabdos.cpp

- Update tests and result to reflect last changes
  Also because Oracle password has changed
    modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
    modified:   storage/connect/mysql-test/connect/r/json_java_2.result
    modified:   storage/connect/mysql-test/connect/r/json_java_3.result
    modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
    modified:   storage/connect/mysql-test/connect/r/mongo_c.result
    modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
    modified:   storage/connect/mysql-test/connect/t/jdbc_oracle.test
    modified:   storage/connect/mysql-test/connect/t/odbc_oracle.test

- Typo
    modified:   storage/connect/reldef.cpp
This commit is contained in:
Olivier Bertrand
2021-05-17 19:17:31 +02:00
parent 5ae67c6d63
commit 17533c1ffc
17 changed files with 136 additions and 106 deletions

View File

@@ -123,11 +123,12 @@ CMgoConn::CMgoConn(PGLOBAL g, PCPARM pcg)
{
Pcg = pcg;
Uri = NULL;
Pool = NULL;
//Pool = NULL;
Client = NULL;
Database = NULL;
Collection = NULL;
Cursor = NULL;
Document = NULL;
Query = NULL;
Opts = NULL;
Fpc = NULL;
@@ -179,6 +180,7 @@ bool CMgoConn::Connect(PGLOBAL g)
return true;
} // endif Uri
#if 0
// Create a new client pool instance
Pool = mongoc_client_pool_new(Uri);
mongoc_client_pool_set_error_api(Pool, 2);
@@ -189,13 +191,24 @@ bool CMgoConn::Connect(PGLOBAL g)
// Create a new client instance
Client = mongoc_client_pool_pop(Pool);
#else
// Create a new client instance
Client = mongoc_client_new_from_uri (Uri);
if (!Client) {
sprintf(g->Message, "Failed to get Client");
return true;
} // endif Client
// Get a handle on the collection Coll_name
// Register the application name so we can track it in the profile logs
// on the server. This can also be done from the URI (see other examples).
mongoc_client_set_appname (Client, "Connect");
// Get a handle on the database
// Database = mongoc_client_get_database (Client, Pcg->Db_name);
#endif // 0
// Get a handle on the collection
Collection = mongoc_client_get_collection(Client, Pcg->Db_name, Pcg->Coll_name);
if (!Collection) {
@@ -794,8 +807,9 @@ void CMgoConn::Close(void)
if (Opts) bson_destroy(Opts);
if (Cursor) mongoc_cursor_destroy(Cursor);
if (Collection) mongoc_collection_destroy(Collection);
if (Client) mongoc_client_pool_push(Pool, Client);
if (Pool) mongoc_client_pool_destroy(Pool);
//if (Client) mongoc_client_pool_push(Pool, Client);
//if (Pool) mongoc_client_pool_destroy(Pool);
if (Client) mongoc_client_destroy(Client);
if (Uri) mongoc_uri_destroy(Uri);
if (Fpc) Fpc->Destroy();
if (fp) fp->Count = 0;