Skip to content

Commit

Permalink
Merge branch 'ob-10.1' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggynours committed Feb 14, 2018
2 parents c6e13e3 + 46f3e32 commit a88bdbd
Show file tree
Hide file tree
Showing 14 changed files with 409 additions and 281 deletions.
1 change: 1 addition & 0 deletions storage/connect/connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ RCODE EvalColumns(PGLOBAL g, PTDB tdbp, bool reset, bool mrr)
rc = RC_FX;
} catch (const char *msg) {
strcpy(g->Message, msg);
rc = RC_NF;
} // end catch

return rc;
Expand Down
4 changes: 3 additions & 1 deletion storage/connect/mysql-test/connect/r/json_java_2.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -381,3 +382,4 @@ planner 167 41.75
postcard 23 5.75
DROP TABLE t1;
true
set connect_enable_mongo=0;
4 changes: 3 additions & 1 deletion storage/connect/mysql-test/connect/r/json_java_3.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -381,3 +382,4 @@ planner 167 41.75
postcard 23 5.75
DROP TABLE t1;
true
set connect_enable_mongo=0;
2 changes: 2 additions & 0 deletions storage/connect/mysql-test/connect/r/json_mongo_c.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -380,3 +381,4 @@ planner 167 41.75
postcard 23 5.75
DROP TABLE t1;
true
set connect_enable_mongo=0;
2 changes: 2 additions & 0 deletions storage/connect/mysql-test/connect/r/mongo_c.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -376,3 +377,4 @@ planner 167 41.750000
postcard 23 5.750000
DROP TABLE t1;
true
set connect_enable_mongo=0;
4 changes: 3 additions & 1 deletion storage/connect/mysql-test/connect/r/mongo_java_2.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar';
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -377,3 +378,4 @@ planner 167 41.75
postcard 23 5.75
DROP TABLE t1;
true
set connect_enable_mongo=0;
4 changes: 3 additions & 1 deletion storage/connect/mysql-test/connect/r/mongo_java_3.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar';
set connect_enable_mongo=1;
#
# Test the MONGO table type
#
Expand Down Expand Up @@ -377,3 +378,4 @@ planner 167 41.75
postcard 23 5.75
DROP TABLE t1;
true
set connect_enable_mongo=0;
19 changes: 16 additions & 3 deletions storage/connect/mysql-test/connect/r/tbl_thread.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
connection master;
CREATE DATABASE connect;
connection slave;
CREATE DATABASE connect;
connection default;
#
# Checking thread TBL tables
#
Expand All @@ -11,6 +16,7 @@ a b
1 test01
2 test02
3 test03
connection master;
CREATE TABLE rt2 (a int, b char(10));
INSERT INTO rt2 VALUES (4,'test04'),(5,'test05'),(6,'test06'),(7,'test07');
SELECT * FROM rt2;
Expand All @@ -19,6 +25,7 @@ a b
5 test05
6 test06
7 test07
connection slave;
USE test;
CREATE TABLE rt3 (a int, b char(10));
INSERT INTO rt3 VALUES (8,'test08'),(9,'test09'),(10,'test10'),(11,'test11');
Expand All @@ -44,6 +51,7 @@ a b
17 test17
18 test18
19 test19
connection default;
CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL
CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/rt2';
SELECT * FROM t2;
Expand Down Expand Up @@ -79,7 +87,7 @@ a b
CREATE TABLE total (a int, b char(10))
ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
OPTION_LIST='thread=yes,port=PORT';
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by a desc;
a b
19 test19
Expand All @@ -103,8 +111,11 @@ a b
1 test01
0 test00
set connect_xtrace=0;
connection master;
DROP TABLE rt2;
connection slave;
DROP TABLE rt3,rt4,rt5;
connection default;
DROP TABLE t1,t2,t3,t4,t5,total;
#
# Old thread TBL tables test modified
Expand All @@ -118,7 +129,7 @@ SELECT * FROM t2;
v
22
CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by v desc;
v
22
Expand All @@ -137,7 +148,7 @@ SELECT * FROM t2;
v
22
CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by v desc;
v
22
Expand All @@ -146,7 +157,9 @@ set connect_xtrace=0;
DROP TABLE total;
DROP TABLE t1;
DROP TABLE t2;
connection master;
DROP TABLE IF EXISTS connect.t1;
DROP DATABASE IF EXISTS connect;
connection slave;
DROP TABLE IF EXISTS connect.t1;
DROP DATABASE IF EXISTS connect;
4 changes: 2 additions & 2 deletions storage/connect/mysql-test/connect/t/mongo.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
let $MONGO= C:/PROGRA~1/MongoDB/Server/3.4/bin/mongo;
let $MONGOIMPORT= C:/PROGRA~1/MongoDB/Server/3.4/bin/mongoimport;
let $MONGO= C:/Applic/MongoDB/Server/3.6/bin/mongo;
let $MONGOIMPORT= C:/Applic/MongoDB/Server/3.6/bin/mongoimport;

8 changes: 6 additions & 2 deletions storage/connect/mysql-test/connect/t/mongo_test.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#set connect_enable_mongo=1;
set connect_enable_mongo=1;

--echo #
--echo # Test the MONGO table type
Expand Down Expand Up @@ -130,7 +130,9 @@ DROP TABLE t1;
--echo #
--echo # try CRUD operations
--echo #
--disable_query_log
--exec $MONGO --eval "db.testcoll.drop()" --quiet
--enable_query_log
eval CREATE TABLE t1 (_id INT(4) NOT NULL, msg CHAR(64))
ENGINE=CONNECT TABLE_TYPE=$TYPE TABNAME='testcoll'
OPTION_LIST='Driver=$DRV,Version=$VERS' $CONN;
Expand All @@ -147,7 +149,9 @@ DROP TABLE t1;
--echo #
--echo # List states whose population is equal or more than 10 millions
--echo #
--disable_query_log
--exec $MONGO --eval "db.cities.drop()" --quiet
--enable_query_log
--exec $MONGOIMPORT --quiet $MTR_SUITE_DIR/std_data/cities.json
eval CREATE TABLE t1 (
_id char(5) NOT NULL,
Expand Down Expand Up @@ -204,4 +208,4 @@ SELECT * FROM t1;
DROP TABLE t1;
--exec $MONGO --eval "db.testcoll.drop()" --quiet

#set connect_enable_mongo=0;
set connect_enable_mongo=0;
6 changes: 3 additions & 3 deletions storage/connect/mysql-test/connect/t/tbl_thread.test
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SELECT * FROM t5;
eval CREATE TABLE total (a int, b char(10))
ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
OPTION_LIST='thread=yes,port=$PORT';
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by a desc;
set connect_xtrace=0;

Expand Down Expand Up @@ -85,7 +85,7 @@ SELECT * FROM t2;

--replace_result $PORT PORT
--eval CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=$PORT';
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by v desc;
set connect_xtrace=0;
DROP TABLE t1,t2,total;
Expand All @@ -101,7 +101,7 @@ SELECT * FROM t2;

--replace_result $PORT PORT
--eval CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=$PORT';
set connect_xtrace=1;
set connect_xtrace=96;
SELECT * FROM total order by v desc;
set connect_xtrace=0;

Expand Down
1 change: 1 addition & 0 deletions storage/connect/tabdos.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */
friend class TXTFAM;
friend class DBFBASE;
friend class UNZIPUTL;
friend class JSONCOL;
public:
// Constructor
DOSDEF(void);
Expand Down
Loading

0 comments on commit a88bdbd

Please sign in to comment.