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