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:
@@ -536,7 +536,7 @@ extern ulonglong my_pcre_frame_size;
|
|||||||
*/
|
*/
|
||||||
extern my_bool opt_large_pages;
|
extern my_bool opt_large_pages;
|
||||||
extern uint opt_large_page_size;
|
extern uint opt_large_page_size;
|
||||||
extern char lc_messages_dir[FN_REFLEN];
|
extern MYSQL_PLUGIN_IMPORT char lc_messages_dir[FN_REFLEN];
|
||||||
extern char *lc_messages_dir_ptr, *log_error_file_ptr;
|
extern char *lc_messages_dir_ptr, *log_error_file_ptr;
|
||||||
extern MYSQL_PLUGIN_IMPORT char reg_ext[FN_EXTLEN];
|
extern MYSQL_PLUGIN_IMPORT char reg_ext[FN_EXTLEN];
|
||||||
extern MYSQL_PLUGIN_IMPORT uint reg_ext_length;
|
extern MYSQL_PLUGIN_IMPORT uint reg_ext_length;
|
||||||
|
@@ -410,12 +410,12 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
|
|||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar
|
${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar
|
${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar
|
||||||
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
|
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT connect-engine)
|
||||||
IF(CONNECT_WITH_MONGO)
|
IF(CONNECT_WITH_MONGO)
|
||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Mongo2.jar
|
${CMAKE_CURRENT_SOURCE_DIR}/Mongo2.jar
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Mongo3.jar
|
${CMAKE_CURRENT_SOURCE_DIR}/Mongo3.jar
|
||||||
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
|
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT connect-engine)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@@ -123,11 +123,12 @@ CMgoConn::CMgoConn(PGLOBAL g, PCPARM pcg)
|
|||||||
{
|
{
|
||||||
Pcg = pcg;
|
Pcg = pcg;
|
||||||
Uri = NULL;
|
Uri = NULL;
|
||||||
Pool = NULL;
|
//Pool = NULL;
|
||||||
Client = NULL;
|
Client = NULL;
|
||||||
Database = NULL;
|
Database = NULL;
|
||||||
Collection = NULL;
|
Collection = NULL;
|
||||||
Cursor = NULL;
|
Cursor = NULL;
|
||||||
|
Document = NULL;
|
||||||
Query = NULL;
|
Query = NULL;
|
||||||
Opts = NULL;
|
Opts = NULL;
|
||||||
Fpc = NULL;
|
Fpc = NULL;
|
||||||
@@ -179,6 +180,7 @@ bool CMgoConn::Connect(PGLOBAL g)
|
|||||||
return true;
|
return true;
|
||||||
} // endif Uri
|
} // endif Uri
|
||||||
|
|
||||||
|
#if 0
|
||||||
// Create a new client pool instance
|
// Create a new client pool instance
|
||||||
Pool = mongoc_client_pool_new(Uri);
|
Pool = mongoc_client_pool_new(Uri);
|
||||||
mongoc_client_pool_set_error_api(Pool, 2);
|
mongoc_client_pool_set_error_api(Pool, 2);
|
||||||
@@ -189,13 +191,24 @@ bool CMgoConn::Connect(PGLOBAL g)
|
|||||||
|
|
||||||
// Create a new client instance
|
// Create a new client instance
|
||||||
Client = mongoc_client_pool_pop(Pool);
|
Client = mongoc_client_pool_pop(Pool);
|
||||||
|
#else
|
||||||
|
// Create a new client instance
|
||||||
|
Client = mongoc_client_new_from_uri (Uri);
|
||||||
|
|
||||||
if (!Client) {
|
if (!Client) {
|
||||||
sprintf(g->Message, "Failed to get Client");
|
sprintf(g->Message, "Failed to get Client");
|
||||||
return true;
|
return true;
|
||||||
} // endif Client
|
} // 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);
|
Collection = mongoc_client_get_collection(Client, Pcg->Db_name, Pcg->Coll_name);
|
||||||
|
|
||||||
if (!Collection) {
|
if (!Collection) {
|
||||||
@@ -794,8 +807,9 @@ void CMgoConn::Close(void)
|
|||||||
if (Opts) bson_destroy(Opts);
|
if (Opts) bson_destroy(Opts);
|
||||||
if (Cursor) mongoc_cursor_destroy(Cursor);
|
if (Cursor) mongoc_cursor_destroy(Cursor);
|
||||||
if (Collection) mongoc_collection_destroy(Collection);
|
if (Collection) mongoc_collection_destroy(Collection);
|
||||||
if (Client) mongoc_client_pool_push(Pool, Client);
|
//if (Client) mongoc_client_pool_push(Pool, Client);
|
||||||
if (Pool) mongoc_client_pool_destroy(Pool);
|
//if (Pool) mongoc_client_pool_destroy(Pool);
|
||||||
|
if (Client) mongoc_client_destroy(Client);
|
||||||
if (Uri) mongoc_uri_destroy(Uri);
|
if (Uri) mongoc_uri_destroy(Uri);
|
||||||
if (Fpc) Fpc->Destroy();
|
if (Fpc) Fpc->Destroy();
|
||||||
if (fp) fp->Count = 0;
|
if (fp) fp->Count = 0;
|
||||||
|
@@ -104,7 +104,7 @@ protected:
|
|||||||
// Members
|
// Members
|
||||||
PCPARM Pcg;
|
PCPARM Pcg;
|
||||||
mongoc_uri_t *Uri;
|
mongoc_uri_t *Uri;
|
||||||
mongoc_client_pool_t *Pool; // Thread safe client pool
|
//mongoc_client_pool_t *Pool; // Thread safe client pool
|
||||||
mongoc_client_t *Client; // The MongoDB client
|
mongoc_client_t *Client; // The MongoDB client
|
||||||
mongoc_database_t *Database; // The MongoDB database
|
mongoc_database_t *Database; // The MongoDB database
|
||||||
mongoc_collection_t *Collection; // The MongoDB collection
|
mongoc_collection_t *Collection; // The MongoDB collection
|
||||||
|
@@ -58,6 +58,7 @@ extern char *JvmPath; // The connect_jvm_path global variable value
|
|||||||
extern char *ClassPath; // The connect_class_path global variable value
|
extern char *ClassPath; // The connect_class_path global variable value
|
||||||
|
|
||||||
char *GetPluginDir(void);
|
char *GetPluginDir(void);
|
||||||
|
char *GetMessageDir(void);
|
||||||
char *GetJavaWrapper(void); // The connect_java_wrapper variable value
|
char *GetJavaWrapper(void); // The connect_java_wrapper variable value
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -400,24 +401,17 @@ bool JAVAConn::Open(PGLOBAL g)
|
|||||||
jpop->Append(ClassPath);
|
jpop->Append(ClassPath);
|
||||||
} // endif ClassPath
|
} // endif ClassPath
|
||||||
|
|
||||||
#if 0
|
// All wrappers are pre-compiled in JavaWrappers.jar in the share dir
|
||||||
// Java source will be compiled as a jar file installed in the plugin dir
|
|
||||||
jpop->Append(sep);
|
jpop->Append(sep);
|
||||||
jpop->Append(GetPluginDir());
|
jpop->Append(GetMessageDir());
|
||||||
jpop->Append("JdbcInterface.jar");
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
// All wrappers are pre-compiled in JavaWrappers.jar in the plugin dir
|
|
||||||
jpop->Append(sep);
|
|
||||||
jpop->Append(GetPluginDir());
|
|
||||||
jpop->Append("JavaWrappers.jar");
|
jpop->Append("JavaWrappers.jar");
|
||||||
|
|
||||||
#if defined(MONGO_SUPPORT)
|
#if defined(MONGO_SUPPORT)
|
||||||
jpop->Append(sep);
|
jpop->Append(sep);
|
||||||
jpop->Append(GetPluginDir());
|
jpop->Append(GetMessageDir());
|
||||||
jpop->Append("Mongo3.jar");
|
jpop->Append("Mongo3.jar");
|
||||||
jpop->Append(sep);
|
jpop->Append(sep);
|
||||||
jpop->Append(GetPluginDir());
|
jpop->Append(GetMessageDir());
|
||||||
jpop->Append("Mongo2.jar");
|
jpop->Append("Mongo2.jar");
|
||||||
#endif // MONGO_SUPPORT
|
#endif // MONGO_SUPPORT
|
||||||
|
|
||||||
|
@@ -123,6 +123,15 @@ char *GetPluginDir(void)
|
|||||||
return opt_plugin_dir;
|
return opt_plugin_dir;
|
||||||
} // end of GetPluginDir
|
} // end of GetPluginDir
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
/* Get the lc_messages_dir, it is where error messages for various */
|
||||||
|
/* languages are installed, and by default the INSTALL_MYSQLSHAREDIR. */
|
||||||
|
/***********************************************************************/
|
||||||
|
char *GetMessageDir(void)
|
||||||
|
{
|
||||||
|
return lc_messages_dir;
|
||||||
|
} // end of GetMessageDir
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Get a unique enum table type ID. */
|
/* Get a unique enum table type ID. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
@@ -78,7 +78,8 @@ struct ha_table_option_struct {
|
|||||||
|
|
||||||
typedef class ha_connect *PHC;
|
typedef class ha_connect *PHC;
|
||||||
|
|
||||||
char *GetPluginDir(void);
|
char *GetPluginDir(void);
|
||||||
|
char *GetMessageDir(void);
|
||||||
TABTYPE GetTypeID(const char *type);
|
TABTYPE GetTypeID(const char *type);
|
||||||
bool IsFileType(TABTYPE type);
|
bool IsFileType(TABTYPE type);
|
||||||
bool IsExactType(TABTYPE type);
|
bool IsExactType(TABTYPE type);
|
||||||
|
@@ -3,7 +3,7 @@ command varchar(128) not null,
|
|||||||
number int(5) not null flag=1,
|
number int(5) not null flag=1,
|
||||||
message varchar(255) flag=2)
|
message varchar(255) flag=2)
|
||||||
ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01,Execsrc=1';
|
OPTION_LIST='User=system,Password=Biscote01,Execsrc=1';
|
||||||
SELECT * FROM t2 WHERE command = 'drop table employee';
|
SELECT * FROM t2 WHERE command = 'drop table employee';
|
||||||
command number message
|
command number message
|
||||||
drop table employee 0 Execute: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
|
drop table employee 0 Execute: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
|
||||||
@@ -23,14 +23,14 @@ Warnings:
|
|||||||
Warning 1105 Affected rows
|
Warning 1105 Affected rows
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC CATFUNC=tables
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC CATFUNC=tables
|
||||||
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01';
|
OPTION_LIST='User=system,Password=Biscote01';
|
||||||
SELECT * FROM t1 WHERE table_name='employee';
|
SELECT * FROM t1 WHERE table_name='employee';
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
NULL SYSTEM EMPLOYEE TABLE NULL
|
NULL SYSTEM EMPLOYEE TABLE NULL
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME='EMPLOYEE' CATFUNC=columns
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME='EMPLOYEE' CATFUNC=columns
|
||||||
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01';
|
OPTION_LIST='User=system,Password=Biscote01';
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
NULL SYSTEM EMPLOYEE ID 3 NUMBER 38 0 0 10 0 NULL
|
NULL SYSTEM EMPLOYEE ID 3 NUMBER 38 0 0 10 0 NULL
|
||||||
@@ -42,7 +42,7 @@ CREATE SERVER 'oracle' FOREIGN DATA WRAPPER 'oracle.jdbc.driver.OracleDriver' OP
|
|||||||
HOST 'jdbc:oracle:thin:@localhost:1521:xe',
|
HOST 'jdbc:oracle:thin:@localhost:1521:xe',
|
||||||
DATABASE 'SYSTEM',
|
DATABASE 'SYSTEM',
|
||||||
USER 'system',
|
USER 'system',
|
||||||
PASSWORD 'Choupy01',
|
PASSWORD 'Biscote01',
|
||||||
PORT 0,
|
PORT 0,
|
||||||
SOCKET '',
|
SOCKET '',
|
||||||
OWNER 'SYSTEM');
|
OWNER 'SYSTEM');
|
||||||
|
@@ -10,7 +10,7 @@ SELECT * from t1 limit 3;
|
|||||||
Document
|
Document
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":"2014-03-03T00:00:00.000Z"},"grade":"A","score":2},{"date":{"$date":"2013-09-11T00:00:00.000Z"},"grade":"A","score":6},{"date":{"$date":"2013-01-24T00:00:00.000Z"},"grade":"A","score":10},{"date":{"$date":"2011-11-23T00:00:00.000Z"},"grade":"A","score":9},{"date":{"$date":"2011-03-10T00:00:00.000Z"},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":"2014-03-03T00:00:00.000Z"},"grade":"A","score":2},{"date":{"$date":"2013-09-11T00:00:00.000Z"},"grade":"A","score":6},{"date":{"$date":"2013-01-24T00:00:00.000Z"},"grade":"A","score":10},{"date":{"$date":"2011-11-23T00:00:00.000Z"},"grade":"A","score":9},{"date":{"$date":"2011-03-10T00:00:00.000Z"},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":"2014-12-30T00:00:00.000Z"},"grade":"A","score":8},{"date":{"$date":"2014-07-01T00:00:00.000Z"},"grade":"B","score":23},{"date":{"$date":"2013-04-30T00:00:00.000Z"},"grade":"A","score":12},{"date":{"$date":"2012-05-08T00:00:00.000Z"},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":"2014-12-30T00:00:00.000Z"},"grade":"A","score":8},{"date":{"$date":"2014-07-01T00:00:00.000Z"},"grade":"B","score":23},{"date":{"$date":"2013-04-30T00:00:00.000Z"},"grade":"A","score":12},{"date":{"$date":"2012-05-08T00:00:00.000Z"},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.98513559999999,40.7676919],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":"2014-09-06T00:00:00.000Z"},"grade":"A","score":2},{"date":{"$date":"2013-07-22T00:00:00.000Z"},"grade":"A","score":11},{"date":{"$date":"2012-07-31T00:00:00.000Z"},"grade":"A","score":12},{"date":{"$date":"2011-12-29T00:00:00.000Z"},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985136,40.767692],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":"2014-09-06T00:00:00.000Z"},"grade":"A","score":2},{"date":{"$date":"2013-07-22T00:00:00.000Z"},"grade":"A","score":11},{"date":{"$date":"2012-07-31T00:00:00.000Z"},"grade":"A","score":12},{"date":{"$date":"2011-12-29T00:00:00.000Z"},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Test catfunc
|
# Test catfunc
|
||||||
|
@@ -10,7 +10,7 @@ SELECT * from t1 limit 3;
|
|||||||
Document
|
Document
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000},"grade":"A","score":2},{"date":{"$date":1378857600000},"grade":"A","score":6},{"date":{"$date":1358985600000},"grade":"A","score":10},{"date":{"$date":1322006400000},"grade":"A","score":9},{"date":{"$date":1299715200000},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000},"grade":"A","score":2},{"date":{"$date":1378857600000},"grade":"A","score":6},{"date":{"$date":1358985600000},"grade":"A","score":10},{"date":{"$date":1322006400000},"grade":"A","score":9},{"date":{"$date":1299715200000},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000},"grade":"A","score":8},{"date":{"$date":1404172800000},"grade":"B","score":23},{"date":{"$date":1367280000000},"grade":"A","score":12},{"date":{"$date":1336435200000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000},"grade":"A","score":8},{"date":{"$date":1404172800000},"grade":"B","score":23},{"date":{"$date":1367280000000},"grade":"A","score":12},{"date":{"$date":1336435200000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.98513559999999,40.7676919],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000},"grade":"A","score":2},{"date":{"$date":1374451200000},"grade":"A","score":11},{"date":{"$date":1343692800000},"grade":"A","score":12},{"date":{"$date":1325116800000},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985136,40.767692],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000},"grade":"A","score":2},{"date":{"$date":1374451200000},"grade":"A","score":11},{"date":{"$date":1343692800000},"grade":"A","score":12},{"date":{"$date":1325116800000},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Test catfunc
|
# Test catfunc
|
||||||
|
@@ -8,9 +8,9 @@ ENGINE=CONNECT TABLE_TYPE=JSON TABNAME=restaurants CONNECTION='mongodb://localho
|
|||||||
OPTION_LIST='Driver=C,Version=0' DATA_CHARSET=utf8;
|
OPTION_LIST='Driver=C,Version=0' DATA_CHARSET=utf8;
|
||||||
SELECT * from t1 limit 3;
|
SELECT * from t1 limit 3;
|
||||||
Document
|
Document
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856076999999999089,40.848447000000000173],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000},"grade":"A","score":2},{"date":{"$date":1378857600000},"grade":"A","score":6},{"date":{"$date":1358985600000},"grade":"A","score":10},{"date":{"$date":1322006400000},"grade":"A","score":9},{"date":{"$date":1299715200000},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000},"grade":"A","score":2},{"date":{"$date":1378857600000},"grade":"A","score":6},{"date":{"$date":1358985600000},"grade":"A","score":10},{"date":{"$date":1322006400000},"grade":"A","score":9},{"date":{"$date":1299715200000},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.96170399999999745,40.66294200000000103],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000},"grade":"A","score":8},{"date":{"$date":1404172800000},"grade":"B","score":23},{"date":{"$date":1367280000000},"grade":"A","score":12},{"date":{"$date":1336435200000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000},"grade":"A","score":8},{"date":{"$date":1404172800000},"grade":"B","score":23},{"date":{"$date":1367280000000},"grade":"A","score":12},{"date":{"$date":1336435200000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985135599999992451,40.767691900000002647],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000},"grade":"A","score":2},{"date":{"$date":1374451200000},"grade":"A","score":11},{"date":{"$date":1343692800000},"grade":"A","score":12},{"date":{"$date":1325116800000},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985136,40.767692],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000},"grade":"A","score":2},{"date":{"$date":1374451200000},"grade":"A","score":11},{"date":{"$date":1343692800000},"grade":"A","score":12},{"date":{"$date":1325116800000},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Test catfunc
|
# Test catfunc
|
||||||
|
@@ -8,9 +8,9 @@ ENGINE=CONNECT TABLE_TYPE=MONGO TABNAME=restaurants
|
|||||||
OPTION_LIST='Driver=C,Version=0' DATA_CHARSET=utf8;
|
OPTION_LIST='Driver=C,Version=0' DATA_CHARSET=utf8;
|
||||||
SELECT * from t1 limit 3;
|
SELECT * from t1 limit 3;
|
||||||
Document
|
Document
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856076999999999089,40.848447000000000173],"street":"Morris ParkAve", "zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000},"grade":"A","score":2},{"date":{"$date":1378857600000},"grade":"A","score":6},{"date":{"$date":1358985600000},"grade":"A","score":10},{"date":{"$date":1322006400000},"grade":"A","score":9},{"date":{"$date":1299715200000},"grade":"B","score":14}],"name":"Morris ParkBakeShop", "restaurant_id":"30075445"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51c"},"address":{"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"},"borough":"Bronx","cuisine":"Bakery","grades":[{"date":{"$date":1393804800000.000000},"grade":"A","score":2},{"date":{"$date":1378857600000.000000},"grade":"A","score":6},{"date":{"$date":1358985600000.000000},"grade":"A","score":10},{"date":{"$date":1322006400000.000000},"grade":"A","score":9},{"date":{"$date":1299715200000.000000},"grade":"B","score":14}],"name":"Morris Park Bake Shop","restaurant_id":"30075445"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.96170399999999745,40.66294200000000103],"street":"Flatbush Avenue", "zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000},"grade":"A","score":8},{"date":{"$date":1404172800000},"grade":"B","score":23},{"date":{"$date":1367280000000},"grade":"A","score":12},{"date":{"$date":1336435200000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51d"},"address":{"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"},"borough":"Brooklyn","cuisine":"Hamburgers","grades":[{"date":{"$date":1419897600000.000000},"grade":"A","score":8},{"date":{"$date":1404172800000.000000},"grade":"B","score":23},{"date":{"$date":1367280000000.000000},"grade":"A","score":12},{"date":{"$date":1336435200000.000000},"grade":"A","score":12}],"name":"Wendy'S","restaurant_id":"30112340"}
|
||||||
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985135599999992451,40.767691900000002647],"street":"West 57Street", "zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000},"grade":"A","score":2},{"date":{"$date":1374451200000},"grade":"A","score":11},{"date":{"$date":1343692800000},"grade":"A","score":12},{"date":{"$date":1325116800000},"grade":"A","score":12}],"name":"Dj ReynoldsPubAndRestaurant", "restaurant_id":"30191841"}
|
{"_id":{"$oid":"58ada47de5a51ddfcd5ed51e"},"address":{"building":"351","coord":[-73.985136,40.767692],"street":"West 57 Street","zipcode":"10019"},"borough":"Manhattan","cuisine":"Irish","grades":[{"date":{"$date":1409961600000.000000},"grade":"A","score":2},{"date":{"$date":1374451200000.000000},"grade":"A","score":11},{"date":{"$date":1343692800000.000000},"grade":"A","score":12},{"date":{"$date":1325116800000.000000},"grade":"A","score":12}],"name":"Dj Reynolds Pub And Restaurant","restaurant_id":"30191841"}
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Test catfunc
|
# Test catfunc
|
||||||
@@ -76,11 +76,11 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='MONGO' `TABNAME`='restaurants' `OPTION_LIST`='Depth=1,Driver=C,Version=0' `DATA_CHARSET`='utf8'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='MONGO' `TABNAME`='restaurants' `OPTION_LIST`='Depth=1,Driver=C,Version=0' `DATA_CHARSET`='utf8'
|
||||||
SELECT * FROM t1 LIMIT 5;
|
SELECT * FROM t1 LIMIT 5;
|
||||||
_id address_building address_coord address_street address_zipcode borough cuisine grades_0 name restaurant_id
|
_id address_building address_coord address_street address_zipcode borough cuisine grades_0 name restaurant_id
|
||||||
58ada47de5a51ddfcd5ed51c 1007 [-73.856076999999999089,40.848447000000000173] Morris Park Ave 10462 Bronx Bakery {"date":{"$date":1393804800000},"grade":"A","score":2} Morris Park Bake Shop 30075445
|
58ada47de5a51ddfcd5ed51c 1007 [-73.856077,40.848447] Morris Park Ave 10462 Bronx Bakery {"date":{"$date":1393804800000},"grade":"A","score":2} Morris Park Bake Shop 30075445
|
||||||
58ada47de5a51ddfcd5ed51d 469 [-73.96170399999999745,40.66294200000000103] Flatbush Avenue 11225 Brooklyn Hamburgers {"date":{"$date":1419897600000},"grade":"A","score":8} Wendy'S 30112340
|
58ada47de5a51ddfcd5ed51d 469 [-73.961704,40.662942] Flatbush Avenue 11225 Brooklyn Hamburgers {"date":{"$date":1419897600000},"grade":"A","score":8} Wendy'S 30112340
|
||||||
58ada47de5a51ddfcd5ed51e 351 [-73.985135599999992451,40.767691900000002647] West 57 Street 10019 Manhattan Irish {"date":{"$date":1409961600000},"grade":"A","score":2} Dj Reynolds Pub And Restaurant 30191841
|
58ada47de5a51ddfcd5ed51e 351 [-73.985136,40.767692] West 57 Street 10019 Manhattan Irish {"date":{"$date":1409961600000},"grade":"A","score":2} Dj Reynolds Pub And Restaurant 30191841
|
||||||
58ada47de5a51ddfcd5ed51f 2780 [-73.982419999999990523,40.579504999999997494] Stillwell Avenue 11224 Brooklyn American {"date":{"$date":1402358400000},"grade":"A","score":5} Riviera Caterer 40356018
|
58ada47de5a51ddfcd5ed51f 2780 [-73.982420,40.579505] Stillwell Avenue 11224 Brooklyn American {"date":{"$date":1402358400000},"grade":"A","score":5} Riviera Caterer 40356018
|
||||||
58ada47de5a51ddfcd5ed520 97-22 [-73.860115199999995639,40.731173900000001709] 63 Road 11374 Queens Jewish/Kosher {"date":{"$date":1416787200000},"grade":"Z","score":20} Tov Kosher Kitchen 40356068
|
58ada47de5a51ddfcd5ed520 97-22 [-73.860115,40.731174] 63 Road 11374 Queens Jewish/Kosher {"date":{"$date":1416787200000},"grade":"Z","score":20} Tov Kosher Kitchen 40356068
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Dropping a column
|
# Dropping a column
|
||||||
@@ -89,16 +89,16 @@ CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=MONGO TABNAME=restaurants DATA_CHARSET
|
|||||||
COLIST='{"projection":{"grades":0}}' OPTION_LIST='Driver=C,Version=0,level=0' ;
|
COLIST='{"projection":{"grades":0}}' OPTION_LIST='Driver=C,Version=0,level=0' ;
|
||||||
SELECT * FROM t1 LIMIT 10;
|
SELECT * FROM t1 LIMIT 10;
|
||||||
_id address borough cuisine name restaurant_id
|
_id address borough cuisine name restaurant_id
|
||||||
58ada47de5a51ddfcd5ed51c {"building":"1007","coord":[-73.856076999999999089,40.848447000000000173],"street":"Morris ParkAve", "zipcode":"10462"} Bronx Bakery Morris Park Bake Shop 30075445
|
58ada47de5a51ddfcd5ed51c {"building":"1007","coord":[-73.856077,40.848447],"street":"Morris Park Ave","zipcode":"10462"} Bronx Bakery Morris Park Bake Shop 30075445
|
||||||
58ada47de5a51ddfcd5ed51d {"building":"469","coord":[-73.96170399999999745,40.66294200000000103],"street":"Flatbush Avenue", "zipcode":"11225"} Brooklyn Hamburgers Wendy'S 30112340
|
58ada47de5a51ddfcd5ed51d {"building":"469","coord":[-73.961704,40.662942],"street":"Flatbush Avenue","zipcode":"11225"} Brooklyn Hamburgers Wendy'S 30112340
|
||||||
58ada47de5a51ddfcd5ed51e {"building":"351","coord":[-73.985135599999992451,40.767691900000002647],"street":"West 57Street", "zipcode":"10019"} Manhattan Irish Dj Reynolds Pub And Restaurant 30191841
|
58ada47de5a51ddfcd5ed51e {"building":"351","coord":[-73.985136,40.767692],"street":"West 57 Street","zipcode":"10019"} Manhattan Irish Dj Reynolds Pub And Restaurant 30191841
|
||||||
58ada47de5a51ddfcd5ed51f {"building":"2780","coord":[-73.982419999999990523,40.579504999999997494],"street":"Stillwell Avenue", "zipcode":"11224"} Brooklyn American Riviera Caterer 40356018
|
58ada47de5a51ddfcd5ed51f {"building":"2780","coord":[-73.982420,40.579505],"street":"Stillwell Avenue","zipcode":"11224"} Brooklyn American Riviera Caterer 40356018
|
||||||
58ada47de5a51ddfcd5ed520 {"building":"97-22","coord":[-73.860115199999995639,40.731173900000001709],"street":"63 Road", "zipcode":"11374"} Queens Jewish/Kosher Tov Kosher Kitchen 40356068
|
58ada47de5a51ddfcd5ed520 {"building":"97-22","coord":[-73.860115,40.731174],"street":"63 Road","zipcode":"11374"} Queens Jewish/Kosher Tov Kosher Kitchen 40356068
|
||||||
58ada47de5a51ddfcd5ed521 {"building":"8825","coord":[-73.880382699999998408,40.764312400000001446],"street":"Astoria Boulevard", "zipcode":"11369"} Queens American Brunos On The Boulevard 40356151
|
58ada47de5a51ddfcd5ed521 {"building":"8825","coord":[-73.880383,40.764312],"street":"Astoria Boulevard","zipcode":"11369"} Queens American Brunos On The Boulevard 40356151
|
||||||
58ada47de5a51ddfcd5ed522 {"building":"2206","coord":[-74.137728600000002643,40.611957199999999091],"street":"Victory Boulevard", "zipcode":"10314"} Staten Island Jewish/Kosher Kosher Island 40356442
|
58ada47de5a51ddfcd5ed522 {"building":"2206","coord":[-74.137729,40.611957],"street":"Victory Boulevard","zipcode":"10314"} Staten Island Jewish/Kosher Kosher Island 40356442
|
||||||
58ada47de5a51ddfcd5ed523 {"building":"7114","coord":[-73.906850599999998508,40.619903399999998328],"street":"Avenue U", "zipcode":"11234"} Brooklyn Delicatessen Wilken'S Fine Food 40356483
|
58ada47de5a51ddfcd5ed523 {"building":"7114","coord":[-73.906851,40.619903],"street":"Avenue U","zipcode":"11234"} Brooklyn Delicatessen Wilken'S Fine Food 40356483
|
||||||
58ada47de5a51ddfcd5ed524 {"building":"6409","coord":[-74.005288999999990551,40.628886000000001388],"street":"11 Avenue", "zipcode":"11219"} Brooklyn American Regina Caterers 40356649
|
58ada47de5a51ddfcd5ed524 {"building":"6409","coord":[-74.005289,40.628886],"street":"11 Avenue","zipcode":"11219"} Brooklyn American Regina Caterers 40356649
|
||||||
58ada47de5a51ddfcd5ed525 {"building":"1839","coord":[-73.948260899999993967,40.640827100000002758],"street":"Nostrand Avenue", "zipcode":"11226"} Brooklyn Ice Cream, Gelato, Yogurt, Ices Taste The Tropics Ice Cream 40356731
|
58ada47de5a51ddfcd5ed525 {"building":"1839","coord":[-73.948261,40.640827],"street":"Nostrand Avenue","zipcode":"11226"} Brooklyn Ice Cream, Gelato, Yogurt, Ices Taste The Tropics Ice Cream 40356731
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Specifying Jpath
|
# Specifying Jpath
|
||||||
|
@@ -10,7 +10,7 @@ SET NAMES utf8;
|
|||||||
|
|
||||||
# All tables in all schemas (filtered with WHERE)
|
# All tables in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables;
|
CATFUNC=Tables;
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -20,7 +20,7 @@ NULL MTR V1 VIEW NULL
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables in all schemas (filtered with WHERE)
|
# All tables in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='%.%';
|
CATFUNC=Tables TABNAME='%.%';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -30,7 +30,7 @@ NULL MTR V1 VIEW NULL
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables "T1" in all schemas (filtered with WHERE)
|
# All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='%.T1';
|
CATFUNC=Tables TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -38,7 +38,7 @@ NULL MTR T1 TABLE NULL
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables "T1" in all schemas (filtered with WHERE)
|
# All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='T1';
|
CATFUNC=Tables TABNAME='T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -46,7 +46,7 @@ NULL MTR T1 TABLE NULL
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# Table "T1" in the schema "MTR"
|
# Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='MTR.T1';
|
CATFUNC=Tables TABNAME='MTR.T1';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -54,7 +54,7 @@ NULL MTR T1 TABLE NULL
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables in the schema "MTR"
|
# All tables in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='MTR.%';
|
CATFUNC=Tables TABNAME='MTR.%';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Table_Type Remark
|
Table_Cat Table_Schema Table_Name Table_Type Remark
|
||||||
@@ -68,7 +68,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
# All columns in all schemas (limited with WHERE)
|
# All columns in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns;
|
CATFUNC=Columns;
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
@@ -80,7 +80,7 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All columns in all schemas (limited with WHERE)
|
# All columns in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='%.%';
|
CATFUNC=Columns TABNAME='%.%';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
@@ -91,7 +91,7 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
|
|||||||
MTR V1 B 6 NUMBER 38 40 NULL NULL 1
|
MTR V1 B 6 NUMBER 38 40 NULL NULL 1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables "T1" in all schemas (limited with WHERE)
|
# All tables "T1" in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' CATFUNC=Columns TABNAME='%.T1';
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' CATFUNC=Columns TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
MTR T1 A 3 DECIMAL 38 40 0 10 1
|
MTR T1 A 3 DECIMAL 38 40 0 10 1
|
||||||
@@ -99,7 +99,7 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# Table "T1" in the schema "MTR"
|
# Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='MTR.T1';
|
CATFUNC=Columns TABNAME='MTR.T1';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
@@ -108,7 +108,7 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# All tables "T1" in all schemas (filtered with WHERE)
|
# All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='%.T1';
|
CATFUNC=Columns TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
|
||||||
@@ -121,14 +121,14 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
# Table "T1" in the default schema ("MTR")
|
# Table "T1" in the default schema ("MTR")
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='T1';
|
TABNAME='T1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`A` decimal(40,0) DEFAULT NULL,
|
`A` decimal(40,0) DEFAULT NULL,
|
||||||
`B` double DEFAULT NULL
|
`B` double DEFAULT NULL
|
||||||
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' `TABLE_TYPE`='ODBC' `TABNAME`='T1'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' `TABLE_TYPE`='ODBC' `TABNAME`='T1'
|
||||||
SELECT * FROM t1 ORDER BY A;
|
SELECT * FROM t1 ORDER BY A;
|
||||||
A B
|
A B
|
||||||
10 1000000000
|
10 1000000000
|
||||||
@@ -157,14 +157,14 @@ DROP VIEW v1;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# Table "T1" in the schema "MTR"
|
# Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.T1';
|
TABNAME='MTR.T1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`A` decimal(40,0) DEFAULT NULL,
|
`A` decimal(40,0) DEFAULT NULL,
|
||||||
`B` double DEFAULT NULL
|
`B` double DEFAULT NULL
|
||||||
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T1'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T1'
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
A B
|
A B
|
||||||
10 1000000000
|
10 1000000000
|
||||||
@@ -173,14 +173,14 @@ A B
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# View "V1" in the schema "MTR"
|
# View "V1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.V1';
|
TABNAME='MTR.V1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`A` decimal(40,0) DEFAULT NULL,
|
`A` decimal(40,0) DEFAULT NULL,
|
||||||
`B` double DEFAULT NULL
|
`B` double DEFAULT NULL
|
||||||
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.V1'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.V1'
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
A B
|
A B
|
||||||
10 1000000000
|
10 1000000000
|
||||||
@@ -209,13 +209,13 @@ DROP VIEW v1;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# Table "T2" in the schema "MTR"
|
# Table "T2" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.T2';
|
TABNAME='MTR.T2';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`A` varchar(64) DEFAULT NULL
|
`A` varchar(64) DEFAULT NULL
|
||||||
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T2'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' `TABLE_TYPE`='ODBC' `TABNAME`='MTR.T2'
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
A
|
A
|
||||||
test
|
test
|
||||||
|
@@ -8,20 +8,20 @@ CREATE TABLE t2 (
|
|||||||
number int(5) not null flag=1,
|
number int(5) not null flag=1,
|
||||||
message varchar(255) flag=2)
|
message varchar(255) flag=2)
|
||||||
ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01,Execsrc=1';
|
OPTION_LIST='User=system,Password=Biscote01,Execsrc=1';
|
||||||
SELECT * FROM t2 WHERE command = 'drop table employee';
|
SELECT * FROM t2 WHERE command = 'drop table employee';
|
||||||
SELECT * FROM t2 WHERE command = 'create table employee (id int not null, name varchar(32), title char(16), salary number(8,2))';
|
SELECT * FROM t2 WHERE command = 'create table employee (id int not null, name varchar(32), title char(16), salary number(8,2))';
|
||||||
SELECT * FROM t2 WHERE command = "insert into employee values(4567,'Johnson', 'Engineer', 12560.50)";
|
SELECT * FROM t2 WHERE command = "insert into employee values(4567,'Johnson', 'Engineer', 12560.50)";
|
||||||
|
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC CATFUNC=tables
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC CATFUNC=tables
|
||||||
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01';
|
OPTION_LIST='User=system,Password=Biscote01';
|
||||||
SELECT * FROM t1 WHERE table_name='employee';
|
SELECT * FROM t1 WHERE table_name='employee';
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME='EMPLOYEE' CATFUNC=columns
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME='EMPLOYEE' CATFUNC=columns
|
||||||
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
CONNECTION='jdbc:oracle:thin:@localhost:1521:xe'
|
||||||
OPTION_LIST='User=system,Password=Choupy01';
|
OPTION_LIST='User=system,Password=Biscote01';
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ CREATE SERVER 'oracle' FOREIGN DATA WRAPPER 'oracle.jdbc.driver.OracleDriver' OP
|
|||||||
HOST 'jdbc:oracle:thin:@localhost:1521:xe',
|
HOST 'jdbc:oracle:thin:@localhost:1521:xe',
|
||||||
DATABASE 'SYSTEM',
|
DATABASE 'SYSTEM',
|
||||||
USER 'system',
|
USER 'system',
|
||||||
PASSWORD 'Choupy01',
|
PASSWORD 'Biscote01',
|
||||||
PORT 0,
|
PORT 0,
|
||||||
SOCKET '',
|
SOCKET '',
|
||||||
OWNER 'SYSTEM');
|
OWNER 'SYSTEM');
|
||||||
|
@@ -78,42 +78,42 @@ SET NAMES utf8;
|
|||||||
|
|
||||||
--echo # All tables in all schemas (filtered with WHERE)
|
--echo # All tables in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables;
|
CATFUNC=Tables;
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables in all schemas (filtered with WHERE)
|
--echo # All tables in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='%.%';
|
CATFUNC=Tables TABNAME='%.%';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='%.T1';
|
CATFUNC=Tables TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='T1';
|
CATFUNC=Tables TABNAME='T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # Table "T1" in the schema "MTR"
|
--echo # Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='MTR.T1';
|
CATFUNC=Tables TABNAME='MTR.T1';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables in the schema "MTR"
|
--echo # All tables in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Tables TABNAME='MTR.%';
|
CATFUNC=Tables TABNAME='MTR.%';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
@@ -127,7 +127,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # All columns in all schemas (limited with WHERE)
|
--echo # All columns in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns;
|
CATFUNC=Columns;
|
||||||
# Disable warnings to avoid "Result limited to 20000 lines"
|
# Disable warnings to avoid "Result limited to 20000 lines"
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@@ -137,7 +137,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # All columns in all schemas (limited with WHERE)
|
--echo # All columns in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='%.%';
|
CATFUNC=Columns TABNAME='%.%';
|
||||||
# Disable warnings to avoid "Result limited to 20000 lines"
|
# Disable warnings to avoid "Result limited to 20000 lines"
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@@ -146,20 +146,20 @@ SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables "T1" in all schemas (limited with WHERE)
|
--echo # All tables "T1" in all schemas (limited with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr' CATFUNC=Columns TABNAME='%.T1';
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew' CATFUNC=Columns TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # Table "T1" in the schema "MTR"
|
--echo # Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='MTR.T1';
|
CATFUNC=Columns TABNAME='MTR.T1';
|
||||||
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
--echo # All tables "T1" in all schemas (filtered with WHERE)
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
CATFUNC=Columns TABNAME='%.T1';
|
CATFUNC=Columns TABNAME='%.T1';
|
||||||
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
SELECT * FROM t1 WHERE Table_Schema='MTR' ORDER BY Table_Schema, Table_Name;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
@@ -172,7 +172,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # Table "T1" in the default schema ("MTR")
|
--echo # Table "T1" in the default schema ("MTR")
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='T1';
|
TABNAME='T1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
SELECT * FROM t1 ORDER BY A;
|
SELECT * FROM t1 ORDER BY A;
|
||||||
@@ -189,7 +189,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # Table "T1" in the schema "MTR"
|
--echo # Table "T1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.T1';
|
TABNAME='MTR.T1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@@ -197,7 +197,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # View "V1" in the schema "MTR"
|
--echo # View "V1" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.V1';
|
TABNAME='MTR.V1';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@@ -214,7 +214,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo # Table "T2" in the schema "MTR"
|
--echo # Table "T2" in the schema "MTR"
|
||||||
CREATE TABLE t1 ENGINE=CONNECT
|
CREATE TABLE t1 ENGINE=CONNECT
|
||||||
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=newmtr'
|
TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineOracle;UID=mtr;PWD=mtrnew'
|
||||||
TABNAME='MTR.T2';
|
TABNAME='MTR.T2';
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
@@ -93,8 +93,7 @@ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info)
|
|||||||
if (check_valid_path(module, strlen(module))) {
|
if (check_valid_path(module, strlen(module))) {
|
||||||
strcpy(g->Message, "Module cannot contain a path");
|
strcpy(g->Message, "Module cannot contain a path");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
PlugSetPath(soname, module, GetPluginDir());
|
PlugSetPath(soname, module, GetPluginDir());
|
||||||
|
|
||||||
// The exported name is always in uppercase
|
// The exported name is always in uppercase
|
||||||
|
@@ -2535,6 +2535,7 @@ void DOSCOL::ReadColumn(PGLOBAL g)
|
|||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
int field;
|
int field;
|
||||||
|
bool err = false;
|
||||||
double dval;
|
double dval;
|
||||||
PTDBDOS tdbp = (PTDBDOS)To_Tdb;
|
PTDBDOS tdbp = (PTDBDOS)To_Tdb;
|
||||||
|
|
||||||
@@ -2578,33 +2579,39 @@ void DOSCOL::ReadColumn(PGLOBAL g)
|
|||||||
case TYPE_SHORT:
|
case TYPE_SHORT:
|
||||||
case TYPE_TINY:
|
case TYPE_TINY:
|
||||||
case TYPE_BIGINT:
|
case TYPE_BIGINT:
|
||||||
if (Value->SetValue_char(p, field - Dcm)) {
|
err = Value->SetValue_char(p, field - Dcm);
|
||||||
sprintf(g->Message, "Out of range value for column %s at row %d",
|
|
||||||
Name, tdbp->RowNumber(g));
|
|
||||||
PushWarning(g, tdbp);
|
|
||||||
} // endif SetValue_char
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case TYPE_DOUBLE:
|
case TYPE_DOUBLE:
|
||||||
Value->SetValue_char(p, field);
|
if (!(err = Value->SetValue_char(p, field))) {
|
||||||
dval = Value->GetFloatValue();
|
dval = Value->GetFloatValue();
|
||||||
|
|
||||||
for (i = 0; i < Dcm; i++)
|
for (i = 0; i < Dcm; i++)
|
||||||
dval /= 10.0;
|
dval /= 10.0;
|
||||||
|
|
||||||
|
Value->SetValue(dval);
|
||||||
|
} // endif err
|
||||||
|
|
||||||
Value->SetValue(dval);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Value->SetValue_char(p, field);
|
err = Value->SetValue_char(p, field);
|
||||||
|
|
||||||
|
if (!err && Buf_Type == TYPE_DECIM) {
|
||||||
|
char* s = Value->GetCharValue();
|
||||||
|
|
||||||
|
if (!(err = ((i = strlen(s)) >= Value->GetClen()))) {
|
||||||
|
for (int d = Dcm + 1; d; i--, d--)
|
||||||
|
s[i + 1] = s[i];
|
||||||
|
|
||||||
|
s[i + 1] = '.';
|
||||||
|
} // endif err
|
||||||
|
|
||||||
|
} // endif DECIM
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} // endswitch Buf_Type
|
} // endswitch Buf_Type
|
||||||
|
|
||||||
else
|
else
|
||||||
if (Value->SetValue_char(p, field)) {
|
err = Value->SetValue_char(p, field);
|
||||||
sprintf(g->Message, "Out of range value for column %s at row %d",
|
|
||||||
Name, tdbp->RowNumber(g));
|
|
||||||
PushWarning(g, tdbp);
|
|
||||||
} // endif SetValue_char
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -2612,6 +2619,12 @@ void DOSCOL::ReadColumn(PGLOBAL g)
|
|||||||
throw 34;
|
throw 34;
|
||||||
} // endswitch Ftype
|
} // endswitch Ftype
|
||||||
|
|
||||||
|
if (err) {
|
||||||
|
sprintf(g->Message, "Out of range value for column %s at row %d",
|
||||||
|
Name, tdbp->RowNumber(g));
|
||||||
|
PushWarning(g, tdbp);
|
||||||
|
} // endif err
|
||||||
|
|
||||||
// Set null when applicable
|
// Set null when applicable
|
||||||
if (Nullable)
|
if (Nullable)
|
||||||
Value->SetNull(Value->IsZero());
|
Value->SetNull(Value->IsZero());
|
||||||
@@ -2702,7 +2715,7 @@ void DOSCOL::WriteColumn(PGLOBAL g)
|
|||||||
case TYPE_DECIM:
|
case TYPE_DECIM:
|
||||||
strcpy(fmt, (Ldz) ? "%0*.*lf" : "%*.*lf");
|
strcpy(fmt, (Ldz) ? "%0*.*lf" : "%*.*lf");
|
||||||
len = field + ((Nod && Dcm) ? 1 : 0);
|
len = field + ((Nod && Dcm) ? 1 : 0);
|
||||||
snprintf(Buf, len, fmt, len, Dcm, Value->GetFloatValue());
|
snprintf(Buf, len + 1, fmt, len, Dcm, Value->GetFloatValue());
|
||||||
len = strlen(Buf);
|
len = strlen(Buf);
|
||||||
|
|
||||||
if (Nod && Dcm)
|
if (Nod && Dcm)
|
||||||
|
Reference in New Issue
Block a user