From 38210b1145fed5c6c45368ad8df3bdf4bc6374c1 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 22 Feb 2013 12:52:56 +0400 Subject: [PATCH] Skip test XML if no XML support is compiled. modified: mysql-test/suite/connect/t/xml.test storage/connect/mycat.cc --- mysql-test/suite/connect/t/xml.test | 1 + storage/connect/mycat.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mysql-test/suite/connect/t/xml.test b/mysql-test/suite/connect/t/xml.test index 5f8b93cd70d..d868e4c723f 100644 --- a/mysql-test/suite/connect/t/xml.test +++ b/mysql-test/suite/connect/t/xml.test @@ -5,6 +5,7 @@ ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2'; if (!`SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1' AND ENGINE='CONNECT' + AND CREATE_OPTIONS LIKE '%`table_type`=XML%' AND CREATE_OPTIONS LIKE '%xmlsup=libxml2%'`) { Skip Need LIBXML2; diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 9146cbec48d..f128c20819a 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -107,10 +107,14 @@ TABTYPE GetTypeID(const char *type) : (!stricmp(type, "CSV")) ? TAB_CSV : (!stricmp(type, "FMT")) ? TAB_FMT : (!stricmp(type, "DBF")) ? TAB_DBF +#ifdef XML_SUPPORT : (!stricmp(type, "XML")) ? TAB_XML +#endif : (!stricmp(type, "INI")) ? TAB_INI : (!stricmp(type, "VEC")) ? TAB_VEC +#ifdef ODBC_SUPPORT : (!stricmp(type, "ODBC")) ? TAB_ODBC +#endif : (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "DIR")) ? TAB_DIR : (!stricmp(type, "MAC")) ? TAB_MAC