Commit b291daac authored by Olivier Bertrand's avatar Olivier Bertrand

- Delete an assert(qrp) from JCATPARM *AllocCatInfo that is called with

  qrp=NULL from JDBConn::SetUUID. Also delete a clone of this function
  that was duplicated in javaconn.cpp.
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jdbconn.cpp

- Update some disabled tests and results to avoid failure
  modified:   storage/connect/mysql-test/connect/r/jdbc.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/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/t/json_java_2.test
  modified:   storage/connect/mysql-test/connect/t/json_java_3.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_2.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_3.test
parent 9644415f
...@@ -81,29 +81,6 @@ GETDEF JAVAConn::GetDefaultJavaVMInitArgs = NULL; ...@@ -81,29 +81,6 @@ GETDEF JAVAConn::GetDefaultJavaVMInitArgs = NULL;
#define DEBUG_ONLY(f) ((void)0) #define DEBUG_ONLY(f) ((void)0)
#endif // !_DEBUG #endif // !_DEBUG
/***********************************************************************/
/* Allocate the structure used to refer to the result set. */
/***********************************************************************/
static JCATPARM *AllocCatInfo(PGLOBAL g, JCATINFO fid, PCSZ db,
PCSZ tab, PQRYRES qrp)
{
JCATPARM *cap;
#if defined(_DEBUG)
assert(qrp);
#endif
if ((cap = (JCATPARM *)PlgDBSubAlloc(g, NULL, sizeof(JCATPARM)))) {
memset(cap, 0, sizeof(JCATPARM));
cap->Id = fid;
cap->Qrp = qrp;
cap->DB = db;
cap->Tab = tab;
} // endif cap
return cap;
} // end of AllocCatInfo
/***********************************************************************/ /***********************************************************************/
/* JAVAConn construction/destruction. */ /* JAVAConn construction/destruction. */
/***********************************************************************/ /***********************************************************************/
......
...@@ -322,10 +322,6 @@ static JCATPARM *AllocCatInfo(PGLOBAL g, JCATINFO fid, PCSZ db, ...@@ -322,10 +322,6 @@ static JCATPARM *AllocCatInfo(PGLOBAL g, JCATINFO fid, PCSZ db,
{ {
JCATPARM *cap; JCATPARM *cap;
#if defined(_DEBUG)
assert(qrp);
#endif
if ((cap = (JCATPARM *)PlgDBSubAlloc(g, NULL, sizeof(JCATPARM)))) { if ((cap = (JCATPARM *)PlgDBSubAlloc(g, NULL, sizeof(JCATPARM)))) {
memset(cap, 0, sizeof(JCATPARM)); memset(cap, 0, sizeof(JCATPARM));
cap->Id = fid; cap->Id = fid;
......
...@@ -236,7 +236,6 @@ WHEELFOR SALESMAN 10030.00 ...@@ -236,7 +236,6 @@ WHEELFOR SALESMAN 10030.00
MARTIN ENGINEER 10000.00 MARTIN ENGINEER 10000.00
DROP TABLE t1, connect.emp; DROP TABLE t1, connect.emp;
CREATE TABLE t2 (command varchar(128) not null,number int(5) not null flag=1,message varchar(255) flag=2) ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:mariadb://localhost:PORT/connect' OPTION_LIST='User=root,Execsrc=1'; CREATE TABLE t2 (command varchar(128) not null,number int(5) not null flag=1,message varchar(255) flag=2) ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:mariadb://localhost:PORT/connect' OPTION_LIST='User=root,Execsrc=1';
SELECT * FROM t2 WHERE command='drop table tx1';
command number message command number message
drop table tx1 0 Execute: java.sql.SQLSyntaxErrorException: (conn:24) Unknown table 'connect.tx1' drop table tx1 0 Execute: java.sql.SQLSyntaxErrorException: (conn:24) Unknown table 'connect.tx1'
SELECT * FROM t2 WHERE command = 'create table tx1 (a int not null, b char(32), c double(8,2))'; SELECT * FROM t2 WHERE command = 'create table tx1 (a int not null, b char(32), c double(8,2))';
......
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
set connect_enable_mongo=1; set connect_enable_mongo=1;
# #
# Test the MONGO table type # Test the MONGO table type
......
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
set connect_enable_mongo=1; set connect_enable_mongo=1;
# #
# Test the MONGO table type # Test the MONGO table type
......
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
set connect_enable_mongo=1; set connect_enable_mongo=1;
# #
# Test the MONGO table type # Test the MONGO table type
......
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
set connect_enable_mongo=1; set connect_enable_mongo=1;
# #
# Test the MONGO table type # Test the MONGO table type
......
-- source jdbconn.inc -- source jdbconn.inc
-- source mongo.inc -- source mongo.inc
--disable_query_log
eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo2.jar'; eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo2.jar';
--enable_query_log
let $DRV= Java; let $DRV= Java;
let $VERS= 2; let $VERS= 2;
let $TYPE= JSON; let $TYPE= JSON;
......
-- source jdbconn.inc -- source jdbconn.inc
-- source mongo.inc -- source mongo.inc
--disable_query_log
eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo3.jar'; eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo3.jar';
--enable_query_log
let $DRV= Java; let $DRV= Java;
let $VERS= 3; let $VERS= 3;
let $TYPE= JSON; let $TYPE= JSON;
......
-- source jdbconn.inc -- source jdbconn.inc
-- source mongo.inc -- source mongo.inc
--disable_query_log
eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo2.jar'; eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo2.jar';
--enable_query_log
let $DRV= Java; let $DRV= Java;
let $VERS= 2; let $VERS= 2;
let $TYPE= MONGO; let $TYPE= MONGO;
......
-- source jdbconn.inc -- source jdbconn.inc
-- source mongo.inc -- source mongo.inc
--disable_query_log
eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo3.jar'; eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/Mongo3.jar';
--enable_query_log
let $DRV= Java; let $DRV= Java;
let $VERS= 3; let $VERS= 3;
let $TYPE= MONGO; let $TYPE= MONGO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment