Commit bffa06c7 authored by Olivier Bertrand's avatar Olivier Bertrand

Try to fix failing tests on LINUX

  modified:   storage/connect/mysql-test/connect/r/alter_xml2.result
  modified:   storage/connect/mysql-test/connect/r/infoschema2-9739.result
  modified:   storage/connect/mysql-test/connect/r/xml2_grant.result
  modified:   storage/connect/mysql-test/connect/r/xml2_mdev5261.result
  modified:   storage/connect/mysql-test/connect/r/xml_mdev5261.result
  modified:   storage/connect/mysql-test/connect/t/xml2_mdev5261.test
  modified:   storage/connect/mysql-test/connect/t/xml_mdev5261.test
parent e58620cd
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.xml Warning 1105 No file name. Table will use t1.xml
# #
# Testing changing table type (not in-place) # Testing changing table type (not in-place)
# #
CREATE TABLE t1 (c INT NOT NULL, d CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV HEADER=1 QUOTED=1; CREATE TABLE t1 (c INT NOT NULL, d CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV HEADER=1 QUOTED=1;
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.csv Warning 1105 No file name. Table will use t1.csv
INSERT INTO t1 VALUES (1,'One'), (2,'Two'), (3,'Three'); INSERT INTO t1 VALUES (1,'One'), (2,'Two'), (3,'Three');
SELECT * FROM t1; SELECT * FROM t1;
c d c d
1 One 1 One
2 Two 2 Two
3 Three 3 Three
# This would fail if the top node name is not specified. # This would fail if the top node name is not specified.
# This is because the XML top node name defaults to the table name. # This is because the XML top node name defaults to the table name.
# Sure enough the temporary table name begins with '#' and is rejected by XML. # Sure enough the temporary table name begins with '#' and is rejected by XML.
# Therefore the top node name must be specified (along with the row nodes name). # Therefore the top node name must be specified (along with the row nodes name).
ALTER TABLE t1 TABLE_TYPE=XML TABNAME=t1 OPTION_LIST='xmlsup=libxml2,rownode=row'; ALTER TABLE t1 TABLE_TYPE=XML TABNAME=t1 OPTION_LIST='xmlsup=libxml2,rownode=row';
SELECT * FROM t1; SELECT * FROM t1;
c d c d
1 One 1 One
2 Two 2 Two
3 Three 3 Three
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
`d` char(10) NOT NULL `d` char(10) NOT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `HEADER`=1 `QUOTED`=1 `TABLE_TYPE`=XML `TABNAME`=t1 `OPTION_LIST`='xmlsup=libxml2,rownode=row' ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `HEADER`=1 `QUOTED`=1 `TABLE_TYPE`=XML `TABNAME`=t1 `OPTION_LIST`='xmlsup=libxml2,rownode=row'
# Let us see the XML file # Let us see the XML file
CREATE TABLE t2 (line VARCHAR(100) NOT NULL) ENGINE=CONNECT FILE_NAME='t1.xml'; CREATE TABLE t2 (line VARCHAR(100) NOT NULL) ENGINE=CONNECT FILE_NAME='t1.xml';
Warnings: Warnings:
Warning 1105 No table_type. Will be set to DOS Warning 1105 No table_type. Will be set to DOS
SELECT * FROM t2; SELECT * FROM t2;
line line
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Created by the MariaDB CONNECT Storage Engine--> <!-- Created by the MariaDB CONNECT Storage Engine-->
<t1> <t1>
<row> <row>
<TH>c</TH> <TH>c</TH>
<TH>d</TH> <TH>d</TH>
</row> </row>
<row> <row>
<c>1</c> <c>1</c>
<d>One</d> <d>One</d>
</row> </row>
<row> <row>
<c>2</c> <c>2</c>
<d>Two</d> <d>Two</d>
</row> </row>
<row> <row>
<c>3</c> <c>3</c>
<d>Three</d> <d>Three</d>
</row> </row>
</t1> </t1>
# NOTE: The first (ignored) row is due to the remaining HEADER=1 option. # NOTE: The first (ignored) row is due to the remaining HEADER=1 option.
# Testing field option modification # Testing field option modification
ALTER TABLE t1 MODIFY d CHAR(10) NOT NULL FIELD_FORMAT='@', HEADER=0; ALTER TABLE t1 MODIFY d CHAR(10) NOT NULL FIELD_FORMAT='@', HEADER=0;
SELECT * FROM t1; SELECT * FROM t1;
c d c d
1 One 1 One
2 Two 2 Two
3 Three 3 Three
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
`d` char(10) NOT NULL `FIELD_FORMAT`='@' `d` char(10) NOT NULL `FIELD_FORMAT`='@'
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `QUOTED`=1 `TABLE_TYPE`=XML `TABNAME`=t1 `OPTION_LIST`='xmlsup=libxml2,rownode=row' `HEADER`=0 ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `QUOTED`=1 `TABLE_TYPE`=XML `TABNAME`=t1 `OPTION_LIST`='xmlsup=libxml2,rownode=row' `HEADER`=0
...@@ -73,14 +73,14 @@ line ...@@ -73,14 +73,14 @@ line
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Created by the MariaDB CONNECT Storage Engine--> <!-- Created by the MariaDB CONNECT Storage Engine-->
<t1> <t1>
<row d="One"> <row d="One">
<c>1</c> <c>1</c>
</row> </row>
<row d="Two"> <row d="Two">
<c>2</c> <c>2</c>
</row> </row>
<row d="Three"> <row d="Three">
<c>3</c> <c>3</c>
</row> </row>
</t1> </t1>
DROP TABLE t1, t2; DROP TABLE t1, t2;
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.xml Warning 1105 No file name. Table will use t1.xml
create table t1 (i int) engine=Connect table_type=XML option_list='xmlsup=libxml2'; create table t1 (i int) engine=Connect table_type=XML option_list='xmlsup=libxml2;
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.xml Warning 1105 No file name. Table will use t1.xml
select * from information_schema.tables where create_options like '%table_type=XML%'; select * from information_schema.tables where create_options like '%table_type=XML%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1296 Got error 174 'File t1.xml not found' from CONNECT Warning 1296 Got error 174 'File t1.xml not found' from CONNECT
drop table t1; drop table t1;
...@@ -6,6 +6,8 @@ Warning 1105 No file name. Table will use t1.xml ...@@ -6,6 +6,8 @@ Warning 1105 No file name. Table will use t1.xml
CREATE USER user@localhost; CREATE USER user@localhost;
GRANT ALL PRIVILEGES ON *.* TO user@localhost; GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost; REVOKE FILE ON *.* FROM user@localhost;
connect user,localhost,user,,;
connection user;
SELECT user(); SELECT user();
user() user()
user@localhost user@localhost
...@@ -34,11 +36,13 @@ DROP VIEW v1; ...@@ -34,11 +36,13 @@ DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT'; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
connection default;
SELECT user(); SELECT user();
user() user()
root@localhost root@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT'; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT';
INSERT INTO t1 VALUES (10); INSERT INTO t1 VALUES (10);
connection user;
SELECT user(); SELECT user();
user() user()
user@localhost user@localhost
...@@ -61,10 +65,12 @@ ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ...@@ -61,10 +65,12 @@ ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
CREATE VIEW v1 AS SELECT * FROM t1; CREATE VIEW v1 AS SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
# Testing a VIEW created with FILE privileges but accessed with no FILE # Testing a VIEW created with FILE privileges but accessed with no FILE
connection default;
SELECT user(); SELECT user();
user() user()
root@localhost root@localhost
CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
connection user;
SELECT user(); SELECT user();
user() user()
user@localhost user@localhost
...@@ -76,6 +82,7 @@ UPDATE v1 SET a=123; ...@@ -76,6 +82,7 @@ UPDATE v1 SET a=123;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM v1; DELETE FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
connection default;
SELECT user(); SELECT user();
user() user()
root@localhost root@localhost
...@@ -85,12 +92,15 @@ CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmls ...@@ -85,12 +92,15 @@ CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmls
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.xml Warning 1105 No file name. Table will use t1.xml
INSERT INTO t1 VALUES (10); INSERT INTO t1 VALUES (10);
connection user;
SELECT user(); SELECT user();
user() user()
user@localhost user@localhost
ALTER TABLE t1 FILE_NAME='t1.EXT'; ALTER TABLE t1 FILE_NAME='t1.EXT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
connection default;
DROP TABLE t1; DROP TABLE t1;
disconnect user;
DROP USER user@localhost; DROP USER user@localhost;
# #
# End of grant.inc # End of grant.inc
......
Warnings: Warnings:
Warning 1105 No file name. Table will use t1.xml Warning 1105 No file name. Table will use t1.xml
SET NAMES utf8; SET NAMES utf8;
CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=libxml2,Rownode=N';
ERROR HY000: Table type XML is not indexable ERROR HY000: Table type XML is not indexable
CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=libxml2,Rownode=N';
DESCRIBE t1; DESCRIBE t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
i int(11) NO NULL i int(11) NO NULL
ALTER TABLE t1 ADD UNIQUE(i); ALTER TABLE t1 ADD UNIQUE(i);
ERROR HY000: Table type XML is not indexable ERROR HY000: Table type XML is not indexable
CREATE UNIQUE INDEX i ON t1(i); CREATE UNIQUE INDEX i ON t1(i);
ERROR HY000: Table type XML is not indexable ERROR HY000: Table type XML is not indexable
DESCRIBE t1; DESCRIBE t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
i int(11) NO NULL i int(11) NO NULL
INSERT INTO t1 VALUES(2),(5),(7); INSERT INTO t1 VALUES(2),(5),(7);
SELECT * FROM t1 WHERE i = 5; SELECT * FROM t1 WHERE i = 5;
i i
......
SET NAMES utf8; SET NAMES utf8;
CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=domdoc,Rownode=N';
ERROR HY000: Table type XML is not indexable ERROR HY000: Table type XML is not indexable
CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=domdoc,Rownode=N';
DESCRIBE t1; DESCRIBE t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
i int(11) NO NULL i int(11) NO NULL
......
...@@ -8,8 +8,8 @@ SET NAMES utf8; ...@@ -8,8 +8,8 @@ SET NAMES utf8;
#--echo Testing indexing on not indexable table type #--echo Testing indexing on not indexable table type
# #
--error ER_UNKNOWN_ERROR --error ER_UNKNOWN_ERROR
CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=libxml2,Rownode=N';
CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=libxml2,Rownode=N';
DESCRIBE t1; DESCRIBE t1;
# one could *add* an index to an existing table # one could *add* an index to an existing table
--error ER_UNKNOWN_ERROR --error ER_UNKNOWN_ERROR
......
...@@ -8,8 +8,8 @@ SET NAMES utf8; ...@@ -8,8 +8,8 @@ SET NAMES utf8;
#--echo Testing indexing on not indexable table type #--echo Testing indexing on not indexable table type
# #
--error ER_UNKNOWN_ERROR --error ER_UNKNOWN_ERROR
CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=domdoc,Rownode=N';
CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='Rownode=N'; CREATE TABLE t1 (i INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=domdoc,Rownode=N';
DESCRIBE t1; DESCRIBE t1;
# one could *add* an index to an existing table # one could *add* an index to an existing table
--error ER_UNKNOWN_ERROR --error ER_UNKNOWN_ERROR
......
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