Commit e8c24a73 authored by Alexander Barkov's avatar Alexander Barkov

Adding OPTION_LIST='xmlsup=libxml2' to make

      sure the tests work in a similar way on Windows
      when both DOMDOC and LIBXML2 are compiled.

      Tests with DOMDOC will go into a separate *.test file.

      modified:
        mysql-test/suite/connect/r/xml.result
        mysql-test/suite/connect/t/xml.test
        storage/connect/CMakeLists.txt
parent 1e3610dd
......@@ -9,10 +9,8 @@ TITLE CHAR(32),
TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml';
#
# Testing that tag names are case sensitive
#
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
AUTHOR
Jean-Christophe
......@@ -40,6 +38,9 @@ PUBLISHER
DATEPUB 1999
DROP TABLE t1;
#
# Testing that tag names are case sensitive
#
CREATE TABLE t1
(
author CHAR(50),
......@@ -47,7 +48,8 @@ TITLE CHAR(32),
TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
author
TITLE Construire une application XML
......@@ -76,7 +78,8 @@ CREATE TABLE t1 (
ISBN CHAR(15),
LANG CHAR(2),
SUBJECT CHAR(32)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml' OPTION_LIST='Coltype=@';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='Coltype=@,xmlsup=libxml2';
SELECT * FROM t1;
ISBN 9782212090819
LANG fr
......@@ -92,7 +95,8 @@ CREATE TABLE t1 (
isbn CHAR(15),
LANG CHAR(2),
SUBJECT CHAR(32)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml' OPTION_LIST='Coltype=@';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='Coltype=@,xmlsup=libxml2';
SELECT * FROM t1;
isbn
LANG fr
......@@ -114,7 +118,8 @@ TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
ISBN 9782212090819
LANG fr
......@@ -161,7 +166,8 @@ TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample2.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK';
TABNAME='BIBLIO'
OPTION_LIST='rownode=BOOK,xmlsup=libxml2';
INSERT INTO t1 (ISBN, LANG, SUBJECT, AUTHOR, TITLE, PUBLISHEr, DATEPUB)
VALUES('9782212090529','fr','général','Alain Michard',
'XML, Langage et Applications','Eyrolles Paris',1998);
......@@ -266,7 +272,7 @@ publisher CHAR(20) FIELD_FORMAT='PUBLISHER/NAME',
location CHAR(20) FIELD_FORMAT='PUBLISHER/PLACE',
year INT(4) FIELD_FORMAT='DATEPUB'
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=libxml2';
SELECT * FROM t1;
isbn 9782212090819
language fr
......@@ -308,7 +314,7 @@ CREATE TABLE t1
(
isbn CHAR(15) FIELD_FORMAT='@isbn'
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=libxml2';
SELECT * FROM t1;
isbn
isbn
......@@ -319,7 +325,8 @@ DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
c ÁÂÃÄÅÆÇ
HEX(c) C1C2C3C4C5C6C7
......@@ -327,7 +334,8 @@ DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16) CHARACTER SET utf8
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
c ÁÂÃÄÅÆÇ
HEX(c) C381C382C383C384C385C386C387
......@@ -339,7 +347,8 @@ DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16) CHARACTER SET cp1251
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
c ???????
HEX(c) 3F3F3F3F3F3F3F
......
......@@ -23,14 +23,15 @@ CREATE TABLE t1
TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
--echo #
--echo # Testing that tag names are case sensitive
--echo #
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1
(
author CHAR(50),
......@@ -38,7 +39,8 @@ CREATE TABLE t1
TRANSLATOR CHAR(40),
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
......@@ -50,7 +52,8 @@ CREATE TABLE t1 (
ISBN CHAR(15),
LANG CHAR(2),
SUBJECT CHAR(32)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml' OPTION_LIST='Coltype=@';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='Coltype=@,xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
......@@ -62,7 +65,8 @@ CREATE TABLE t1 (
isbn CHAR(15),
LANG CHAR(2),
SUBJECT CHAR(32)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml' OPTION_LIST='Coltype=@';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
OPTION_LIST='Coltype=@,xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
......@@ -80,7 +84,8 @@ CREATE TABLE t1 (
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK'
OPTION_LIST='xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
......@@ -99,7 +104,8 @@ CREATE TABLE t1 (
PUBLISHER CHAR(40),
DATEPUB INT(4)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample2.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK';
TABNAME='BIBLIO'
OPTION_LIST='rownode=BOOK,xmlsup=libxml2';
INSERT INTO t1 (ISBN, LANG, SUBJECT, AUTHOR, TITLE, PUBLISHEr, DATEPUB)
VALUES('9782212090529','fr','général','Alain Michard',
'XML, Langage et Applications','Eyrolles Paris',1998);
......@@ -126,7 +132,7 @@ CREATE TABLE t1 (
location CHAR(20) FIELD_FORMAT='PUBLISHER/PLACE',
year INT(4) FIELD_FORMAT='DATEPUB'
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=libxml2';
SELECT * FROM t1;
SELECT isbn, title, translated, tranfn, tranln, location FROM t1
WHERE translated <> '';
......@@ -170,7 +176,7 @@ CREATE TABLE t1
(
isbn CHAR(15) FIELD_FORMAT='@isbn'
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xsample.xml'
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1';
TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=libxml2';
SELECT * FROM t1;
DROP TABLE t1;
......@@ -181,14 +187,16 @@ DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16)
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16) CHARACTER SET utf8
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
DROP TABLE t1;
......@@ -200,7 +208,8 @@ DROP TABLE t1;
CREATE TABLE t1
(
c CHAR(16) CHARACTER SET cp1251
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml';
) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='latin1.xml'
OPTION_LIST='xmlsup=libxml2';
SELECT c, HEX(c) FROM t1;
DROP TABLE t1;
......
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