Commit f7e95c8e authored by Sergei Golubchik's avatar Sergei Golubchik

merge with maria-10.0-connect

parents 6bd49441 0b034c1b
......@@ -252,7 +252,7 @@ ENDIF(CONNECT_WITH_ODBC)
MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
STORAGE_ENGINE
MODULE_OUTPUT_NAME "ha_connect"
COMPONENT connect_engine
COMPONENT connect-engine
LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
${ODBC_LIBRARY} ${IPHLPAPI_LIBRARY})
......@@ -263,12 +263,12 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
IF (INSTALL_SYSCONFDIR)
INSTALL(FILES connect.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d
COMPONENT connect_engine)
COMPONENT connect-engine)
ENDIF(INSTALL_SYSCONFDIR)
IF(RPM)
SET(CPACK_COMPONENT_CASSANDRASELIBRARIES_GROUP "connect_engine" PARENT_SCOPE)
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} connect_engine PARENT_SCOPE)
SET(CPACK_COMPONENT_CASSANDRASELIBRARIES_GROUP "connect-engine" PARENT_SCOPE)
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} connect-engine PARENT_SCOPE)
SET(CPACK_RPM_connect_engine_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE)
# workarounds for cmake issues #13248 and #12864:
......
......@@ -903,7 +903,7 @@ void CSORT::Qstc(int *base, int *max)
/***********************************************************************/
void CSORT::Istc(int *base, int *hi, int *max)
{
register int c;
register int c = 0;
register int *lo;
register int *i, *j;
......
......@@ -30,11 +30,11 @@ user()
user@localhost
SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
INSERT INTO t1 VALUES ('xxx');
INSERT INTO t1 VALUES ();
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM t1 WHERE a='xxx';
DELETE FROM t1 WHERE path='xxx';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE t1 SET a='yyy' WHERE a='xxx';
UPDATE t1 SET path='yyy' WHERE path='xxx';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
TRUNCATE TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
......@@ -52,9 +52,9 @@ user()
user@localhost
SELECT * FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
INSERT INTO v1 VALUES (2);
INSERT INTO v1 VALUES (1,1,1,1);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE v1 SET a=123;
UPDATE v1 SET path=123;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
......
......@@ -6,14 +6,14 @@ REVOKE FILE ON *.* FROM user@localhost;
SELECT user();
user()
user@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT';
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=PORT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT user();
user()
root@localhost
CREATE TABLE t1remote (a INT NOT NULL);
INSERT INTO t1remote VALUES (10),(20),(30);
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL TABNAME=t1remote OPTION_LIST='host=localhost,user=root,port=$PORT';
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL TABNAME=t1remote OPTION_LIST='host=localhost,user=root,port=PORT';
SELECT * FROM t1;
a
10
......
......@@ -41,11 +41,7 @@ ta message
1 Testing
2 myisam table
3 t4
CREATE TABLE total (
tabname CHAR(8) NOT NULL SPECIAL='TABID',
ta TINYINT NOT NULL FLAG=1,
message CHAR(20))
engine=CONNECT table_type=TBL table_list='t1,t2,t3,t4';
CREATE TABLE total (tabname CHAR(8) NOT NULL SPECIAL='TABID', ta TINYINT NOT NULL FLAG=1, message CHAR(20)) engine=CONNECT table_type=TBL table_list='t1,t2,t3,t4' option_list='port=PORT';
select * from total;
tabname ta message
t1 1 Testing
......
......@@ -33,11 +33,11 @@ SELECT user();
--error ER_ACCESS_DENIED_ERROR
SELECT * FROM t1;
--error ER_ACCESS_DENIED_ERROR
INSERT INTO t1 VALUES ('xxx');
INSERT INTO t1 VALUES ();
--error ER_ACCESS_DENIED_ERROR
DELETE FROM t1 WHERE a='xxx';
DELETE FROM t1 WHERE path='xxx';
--error ER_ACCESS_DENIED_ERROR
UPDATE t1 SET a='yyy' WHERE a='xxx';
UPDATE t1 SET path='yyy' WHERE path='xxx';
--error ER_ACCESS_DENIED_ERROR
TRUNCATE TABLE t1;
--error ER_ACCESS_DENIED_ERROR
......@@ -54,9 +54,9 @@ SELECT user();
--error ER_ACCESS_DENIED_ERROR
SELECT * FROM v1;
--error ER_ACCESS_DENIED_ERROR
INSERT INTO v1 VALUES (2);
INSERT INTO v1 VALUES (1,1,1,1);
--error ER_ACCESS_DENIED_ERROR
UPDATE v1 SET a=123;
UPDATE v1 SET path=123;
--error ER_ACCESS_DENIED_ERROR
DELETE FROM v1;
......
......@@ -22,13 +22,15 @@ REVOKE FILE ON *.* FROM user@localhost;
--connect(user,localhost,user,,)
--connection user
SELECT user();
--replace_result $PORT PORT
--error ER_ACCESS_DENIED_ERROR
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT';
--eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT'
--connection default
SELECT user();
CREATE TABLE t1remote (a INT NOT NULL);
INSERT INTO t1remote VALUES (10),(20),(30);
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL TABNAME=t1remote OPTION_LIST='host=localhost,user=root,port=$PORT';
--replace_result $PORT PORT
--eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL TABNAME=t1remote OPTION_LIST='host=localhost,user=root,port=$PORT'
SELECT * FROM t1;
--connection user
SELECT user();
......
let $MYSQLD_DATADIR= `select @@datadir`;
let $PORT= `select @@port`;
--echo #
--echo # Checking TBL tables
......@@ -27,11 +28,8 @@ message CHAR(20)) ENGINE=MyISAM;
INSERT INTO t4 (message) VALUES ('Testing'),('myisam table'),('t4');
SELECT * FROM t4;
CREATE TABLE total (
tabname CHAR(8) NOT NULL SPECIAL='TABID',
ta TINYINT NOT NULL FLAG=1,
message CHAR(20))
engine=CONNECT table_type=TBL table_list='t1,t2,t3,t4';
--replace_result $PORT PORT
--eval CREATE TABLE total (tabname CHAR(8) NOT NULL SPECIAL='TABID', ta TINYINT NOT NULL FLAG=1, message CHAR(20)) engine=CONNECT table_type=TBL table_list='t1,t2,t3,t4' option_list='port=$PORT'
select * from total;
select * from total where tabname = 't2';
......
......@@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF()
ELSE()
SET(CPACK_COMPONENTS_USED
"Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect_engine")
"Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine")
ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
......@@ -63,10 +63,10 @@ SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install server")
SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1)
#Subfeature "Connect Engine"
SET(CPACK_COMPONENT_CONNECT_ENGINE_GROUP "MySQLServer")
SET(CPACK_COMPONENT_CONNECT_ENGINE_DISPLAY_NAME "Server data files")
SET(CPACK_COMPONENT_CONNECT_ENGINE_DESCRIPTION "Server data files" )
SET(CPACK_COMPONENT_CONNECT_ENGINE_HIDDEN 1)
SET(CPACK_COMPONENT_CONNECT-ENGINE_GROUP "MySQLServer")
SET(CPACK_COMPONENT_CONNECT-ENGINE_DISPLAY_NAME "Server data files")
SET(CPACK_COMPONENT_CONNECT-ENGINE_DESCRIPTION "Server data files" )
SET(CPACK_COMPONENT_CONNECT-ENGINE_HIDDEN 1)
#Feature "Devel"
......
......@@ -29,6 +29,21 @@ SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@")
SET(THIRD_PARTY_FEATURE_CONDITION "@THIRD_PARTY_FEATURE_CONDITION@")
SET(LIBMYSQL_LOCATION "@LIBMYSQL_LOCATION@")
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
STRING(LENGTH "${${varname}}" len)
# Identifier should be smaller than 72 character
# We have to cut down the length to 70 chars, since we add 2 char prefix
# pretty often
IF(len GREATER 70)
MATH(EXPR diff "${len}-67")
STRING(SUBSTRING "${${varname}}" ${diff} 67 shortstr)
SET(${varname} "___${shortstr}")
ENDIF()
ENDMACRO()
SET($ENV{VS_UNICODE_OUTPUT} "")
IF(LIBMYSQL_LOCATION AND CMAKE_CFG_INTDIR)
# resolve libmysql full path
......@@ -191,6 +206,7 @@ FOREACH(f ${WIX_FEATURES})
Level='${Level}' ${DISPLAY} >"
)
FOREACH(c ${${f}_COMPONENTS})
STRING(TOUPPER "${c}" c_upper)
IF (CPACK_COMPONENT_${c_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_${c_upper}_DISPLAY_NAME})
......@@ -208,10 +224,12 @@ FOREACH(f ${WIX_FEATURES})
ELSE()
SET(Level 1)
ENDIF()
MAKE_WIX_IDENTIFIER("${c}" cg)
IF(CPACK_COMPONENT_${c_upper}_HIDDEN)
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<ComponentGroupRef Id='componentgroup.${c}'/>")
<ComponentGroupRef Id='componentgroup.${cg}'/>")
ELSE()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
......@@ -221,7 +239,7 @@ FOREACH(f ${WIX_FEATURES})
ConfigurableDirectory='INSTALLDIR'
AllowAdvertise='no'
Level='${Level}'>
<ComponentGroupRef Id='componentgroup.${c}'/>
<ComponentGroupRef Id='componentgroup.${cg}'/>
</Feature>")
ENDIF()
......@@ -248,21 +266,6 @@ MACRO(GENERATE_GUID VarName)
OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO()
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
STRING(LENGTH "${${varname}}" len)
# Identifier should be smaller than 72 character
# We have to cut down the length to 70 chars, since we add 2 char prefix
# pretty often
IF(len GREATER 70)
MATH(EXPR diff "${len}-67")
STRING(SUBSTRING "${${varname}}" ${diff} 67 shortstr)
SET(${varname} "___${shortstr}")
ENDIF()
ENDMACRO()
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(GLOB all_files ${dir}/*)
......@@ -354,6 +357,7 @@ GET_FILENAME_COMPONENT(abs . ABSOLUTE)
FOREACH(d ${DIRS})
GET_FILENAME_COMPONENT(d ${d} ABSOLUTE)
GET_FILENAME_COMPONENT(d_name ${d} NAME)
MAKE_WIX_IDENTIFIER("${d_name}" d_name)
FILE(WRITE ${abs}/${d_name}_component_group.wxs
"<ComponentGroup Id='componentgroup.${d_name}'>")
SET(COMP_NAME ${d_name})
......
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