Commit dae4bd0b authored by Olivier Bertrand's avatar Olivier Bertrand

Fix xml.test failure. Fix compile error modified json.h

parent 477b5256
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
#define X #define X
#endif #endif
// Required by some compilers
enum JTYP : short;
enum JTYP : short { enum JTYP : short {
TYPE_NULL = TYPE_VOID, TYPE_NULL = TYPE_VOID,
TYPE_STRG = TYPE_STRING, TYPE_STRG = TYPE_STRING,
......
...@@ -85,9 +85,9 @@ DROP TABLE t1; ...@@ -85,9 +85,9 @@ DROP TABLE t1;
# Testing mixed tag and attribute values # Testing mixed tag and attribute values
# #
CREATE TABLE t1 ( CREATE TABLE t1 (
ISBN CHAR(15) XPATH='@', ISBN CHAR(15) FIELD_FORMAT='@',
LANG CHAR(2) XPATH='@', LANG CHAR(2) FIELD_FORMAT='@',
SUBJECT CHAR(32) XPATH='@', SUBJECT CHAR(32) FIELD_FORMAT='@',
AUTHOR CHAR(50), AUTHOR CHAR(50),
TITLE CHAR(32), TITLE CHAR(32),
TRANSLATOR CHAR(40), TRANSLATOR CHAR(40),
...@@ -118,9 +118,9 @@ DROP TABLE t1; ...@@ -118,9 +118,9 @@ DROP TABLE t1;
# Testing INSERT on mixed tag and attribute values # Testing INSERT on mixed tag and attribute values
# #
CREATE TABLE t1 ( CREATE TABLE t1 (
ISBN CHAR(15) XPATH='@', ISBN CHAR(15) FIELD_FORMAT='@',
LANG CHAR(2) XPATH='@', LANG CHAR(2) FIELD_FORMAT='@',
SUBJECT CHAR(32) XPATH='@', SUBJECT CHAR(32) FIELD_FORMAT='@',
AUTHOR CHAR(50), AUTHOR CHAR(50),
TITLE CHAR(32), TITLE CHAR(32),
TRANSLATOR CHAR(40), TRANSLATOR CHAR(40),
...@@ -205,18 +205,18 @@ DROP TABLE t1; ...@@ -205,18 +205,18 @@ DROP TABLE t1;
# Testing XPath # Testing XPath
# #
CREATE TABLE t1 ( CREATE TABLE t1 (
isbn CHAR(15) XPATH='@ISBN', isbn CHAR(15) FIELD_FORMAT='@ISBN',
language CHAR(2) XPATH='@LANG', language CHAR(2) FIELD_FORMAT='@LANG',
subject CHAR(32) XPATH='@SUBJECT', subject CHAR(32) FIELD_FORMAT='@SUBJECT',
authorfn CHAR(20) XPATH='AUTHOR/FIRSTNAME', authorfn CHAR(20) FIELD_FORMAT='AUTHOR/FIRSTNAME',
authorln CHAR(20) XPATH='AUTHOR/LASTNAME', authorln CHAR(20) FIELD_FORMAT='AUTHOR/LASTNAME',
title CHAR(32) XPATH='TITLE', title CHAR(32) FIELD_FORMAT='TITLE',
translated CHAR(32) XPATH='TRANSLATOR/@PREFIX', translated CHAR(32) FIELD_FORMAT='TRANSLATOR/@PREFIX',
tranfn CHAR(20) XPATH='TRANSLATOR/FIRSTNAME', tranfn CHAR(20) FIELD_FORMAT='TRANSLATOR/FIRSTNAME',
tranln CHAR(20) XPATH='TRANSLATOR/LASTNAME', tranln CHAR(20) FIELD_FORMAT='TRANSLATOR/LASTNAME',
publisher CHAR(20) XPATH='PUBLISHER/NAME', publisher CHAR(20) FIELD_FORMAT='PUBLISHER/NAME',
location CHAR(20) XPATH='PUBLISHER/PLACE', location CHAR(20) FIELD_FORMAT='PUBLISHER/PLACE',
year INT(4) XPATH='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,xmlsup=domdoc'; TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=domdoc';
SELECT * FROM t1; SELECT * FROM t1;
...@@ -258,7 +258,7 @@ DROP TABLE t1; ...@@ -258,7 +258,7 @@ DROP TABLE t1;
# #
CREATE TABLE t1 CREATE TABLE t1
( (
isbn CHAR(15) XPATH='@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,xmlsup=domdoc'; TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=domdoc';
SELECT * FROM t1; SELECT * FROM t1;
...@@ -323,7 +323,7 @@ HEX(c) 3F3F3F3F3F3F3F ...@@ -323,7 +323,7 @@ HEX(c) 3F3F3F3F3F3F3F
Warnings: Warnings:
Level Warning Level Warning
Code 1366 Code 1366
Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column `test`.`t1`.`c` at row 1 Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column 'c' at row 1
Level Warning Level Warning
Code 1105 Code 1105
Message Out of range value ÁÂÃÄÅÆÇ for column 'c' at row 1 Message Out of range value ÁÂÃÄÅÆÇ for column 'c' at row 1
......
...@@ -77,9 +77,9 @@ DROP TABLE t1; ...@@ -77,9 +77,9 @@ DROP TABLE t1;
--echo # Testing mixed tag and attribute values --echo # Testing mixed tag and attribute values
--echo # --echo #
CREATE TABLE t1 ( CREATE TABLE t1 (
ISBN CHAR(15) XPATH='@', ISBN CHAR(15) FIELD_FORMAT='@',
LANG CHAR(2) XPATH='@', LANG CHAR(2) FIELD_FORMAT='@',
SUBJECT CHAR(32) XPATH='@', SUBJECT CHAR(32) FIELD_FORMAT='@',
AUTHOR CHAR(50), AUTHOR CHAR(50),
TITLE CHAR(32), TITLE CHAR(32),
TRANSLATOR CHAR(40), TRANSLATOR CHAR(40),
...@@ -98,9 +98,9 @@ DROP TABLE t1; ...@@ -98,9 +98,9 @@ DROP TABLE t1;
--copy_file $MTR_SUITE_DIR/std_data/xsample.xml $MYSQLD_DATADIR/test/xsample2.xml --copy_file $MTR_SUITE_DIR/std_data/xsample.xml $MYSQLD_DATADIR/test/xsample2.xml
--chmod 0644 $MYSQLD_DATADIR/test/xsample2.xml --chmod 0644 $MYSQLD_DATADIR/test/xsample2.xml
CREATE TABLE t1 ( CREATE TABLE t1 (
ISBN CHAR(15) XPATH='@', ISBN CHAR(15) FIELD_FORMAT='@',
LANG CHAR(2) XPATH='@', LANG CHAR(2) FIELD_FORMAT='@',
SUBJECT CHAR(32) XPATH='@', SUBJECT CHAR(32) FIELD_FORMAT='@',
AUTHOR CHAR(50), AUTHOR CHAR(50),
TITLE CHAR(32), TITLE CHAR(32),
TRANSLATOR CHAR(40), TRANSLATOR CHAR(40),
...@@ -123,18 +123,18 @@ DROP TABLE t1; ...@@ -123,18 +123,18 @@ DROP TABLE t1;
--echo # Testing XPath --echo # Testing XPath
--echo # --echo #
CREATE TABLE t1 ( CREATE TABLE t1 (
isbn CHAR(15) XPATH='@ISBN', isbn CHAR(15) FIELD_FORMAT='@ISBN',
language CHAR(2) XPATH='@LANG', language CHAR(2) FIELD_FORMAT='@LANG',
subject CHAR(32) XPATH='@SUBJECT', subject CHAR(32) FIELD_FORMAT='@SUBJECT',
authorfn CHAR(20) XPATH='AUTHOR/FIRSTNAME', authorfn CHAR(20) FIELD_FORMAT='AUTHOR/FIRSTNAME',
authorln CHAR(20) XPATH='AUTHOR/LASTNAME', authorln CHAR(20) FIELD_FORMAT='AUTHOR/LASTNAME',
title CHAR(32) XPATH='TITLE', title CHAR(32) FIELD_FORMAT='TITLE',
translated CHAR(32) XPATH='TRANSLATOR/@PREFIX', translated CHAR(32) FIELD_FORMAT='TRANSLATOR/@PREFIX',
tranfn CHAR(20) XPATH='TRANSLATOR/FIRSTNAME', tranfn CHAR(20) FIELD_FORMAT='TRANSLATOR/FIRSTNAME',
tranln CHAR(20) XPATH='TRANSLATOR/LASTNAME', tranln CHAR(20) FIELD_FORMAT='TRANSLATOR/LASTNAME',
publisher CHAR(20) XPATH='PUBLISHER/NAME', publisher CHAR(20) FIELD_FORMAT='PUBLISHER/NAME',
location CHAR(20) XPATH='PUBLISHER/PLACE', location CHAR(20) FIELD_FORMAT='PUBLISHER/PLACE',
year INT(4) XPATH='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,xmlsup=domdoc'; TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=domdoc';
SELECT * FROM t1; SELECT * FROM t1;
...@@ -150,8 +150,8 @@ DROP TABLE t1; ...@@ -150,8 +150,8 @@ DROP TABLE t1;
#--echo # Relative paths are not supported #--echo # Relative paths are not supported
#--echo # #--echo #
#CREATE TABLE t1 ( #CREATE TABLE t1 (
# authorfn CHAR(20) XPATH='//FIRSTNAME', # authorfn CHAR(20) FIELD_FORMAT='//FIRSTNAME',
# authorln CHAR(20) XPATH='//LASTNAME' # authorln CHAR(20) FIELD_FORMAT='//LASTNAME'
#) 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';
#SELECT * FROM t1; #SELECT * FROM t1;
...@@ -165,8 +165,8 @@ DROP TABLE t1; ...@@ -165,8 +165,8 @@ DROP TABLE t1;
#--echo # Absolute path is not supported #--echo # Absolute path is not supported
#--echo # #--echo #
#CREATE TABLE t1 ( #CREATE TABLE t1 (
# authorfn CHAR(20) XPATH='/BIBLIO/BOOK/AUTHOR/FIRSTNAME', # authorfn CHAR(20) FIELD_FORMAT='/BIBLIO/BOOK/AUTHOR/FIRSTNAME',
# authorln CHAR(20) XPATH='/BIBLIO/BOOK/AUTHOR/LASTNAME' # authorln CHAR(20) FIELD_FORMAT='/BIBLIO/BOOK/AUTHOR/LASTNAME'
#) 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';
#SELECT * FROM t1; #SELECT * FROM t1;
...@@ -178,7 +178,7 @@ DROP TABLE t1; ...@@ -178,7 +178,7 @@ DROP TABLE t1;
--echo # --echo #
CREATE TABLE t1 CREATE TABLE t1
( (
isbn CHAR(15) XPATH='@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,xmlsup=domdoc'; TABNAME='BIBLIO' OPTION_LIST='rownode=BOOK,skipnull=1,xmlsup=domdoc';
SELECT * FROM t1; SELECT * FROM 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