mariadb/mysql-test/suite/connect/r/vec.result
Alexander Barkov 70e92c855e Recording error messages according to the last change from Olivier.
modified:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/r/csv.result
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/r/dir.result
  mysql-test/suite/connect/r/fix.result
  mysql-test/suite/connect/r/general.result
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/r/vec.result
  mysql-test/suite/connect/t/dbf.test
  mysql-test/suite/connect/t/dir.test
  mysql-test/suite/connect/t/general.test
2013-02-15 09:42:10 +04:00

142 lines
3.4 KiB
Text

CREATE TABLE dir1 (
spath VARCHAR(256) flag=1,
fname VARCHAR(256),
ftype CHAR(4),
size DOUBLE(12,0) flag=5
) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*vec*';
CREATE TABLE t1
(
a INT,
b CHAR(10)
) ENGINE=CONNECT TABLE_TYPE=VEC FILE_NAME='t1vec';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(10) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=VEC `FILE_NAME`='t1vec'
SELECT * FROM t1;
a b
Warnings:
Warning 1105 Open(rb) error 2 on DATADIR/test/t1vec1: No such file or directory
Warning 1105 Open(rb) error 2 on DATADIR/test/t1vec2: No such file or directory
INSERT INTO t1 VALUES (0,'test01'), (1,'test01'), (2,'test02'), (3,'test03');
SELECT * FROM t1;
a b
0 test01
1 test01
2 test02
3 test03
SELECT a FROM t1;
a
0
1
2
3
SELECT b FROM t1;
b
test01
test01
test02
test03
SELECT fname, ftype, size FROM dir1 ORDER BY fname, ftype;
fname ftype size
t1vec1 16
t1vec2 40
DROP TABLE t1;
CREATE TABLE t1
(
a INT,
b CHAR(10)
) ENGINE=CONNECT TABLE_TYPE=VEC FILE_NAME='t1vec' MAX_ROWS=10;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(10) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 MAX_ROWS=10 `TABLE_TYPE`=VEC `FILE_NAME`='t1vec'
SELECT * FROM t1;
a b
Warnings:
Warning 1105 Open(rb) error 2 on DATADIR/test/t1vec: No such file or directory
SELECT a FROM t1;
a
Warnings:
Warning 1105 Open(rb) error 2 on DATADIR/test/t1vec: No such file or directory
SELECT b FROM t1;
b
Warnings:
Warning 1105 Open(rb) error 2 on DATADIR/test/t1vec: No such file or directory
INSERT INTO t1 VALUES (0,'test01'), (1,'test01'), (2,'test02'), (3,'test03');
SELECT * FROM t1;
a b
0 test01
1 test01
2 test02
3 test03
SELECT a FROM t1;
a
0
1
2
3
SELECT b FROM t1;
b
test01
test01
test02
test03
SELECT fname, ftype, size FROM dir1 ORDER BY fname, ftype;
fname ftype size
t1vec 1400
t1vec .blk 8
#
# Testing READONLY
#
ALTER TABLE t1 READONLY=yes;
Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(10) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 MAX_ROWS=10 `TABLE_TYPE`=VEC `FILE_NAME`='t1vec' `READONLY`=yes
INSERT INTO t1 VALUES (4,'test04');
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
UPDATE t1 SET b='test04' WHERE a=3;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
DELETE FROM t1 WHERE a=3;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
TRUNCATE TABLE t1;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=no;
Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(10) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 MAX_ROWS=10 `TABLE_TYPE`=VEC `FILE_NAME`='t1vec' `READONLY`=no
INSERT INTO t1 VALUES (4,'test04');
UPDATE t1 SET b='test04a' WHERE a=4;
DELETE FROM t1 WHERE a=0;
SELECT * FROM t1;
a b
1 test01
2 test02
3 test03
4 test04a
TRUNCATE TABLE t1;
SELECT fname, ftype, size FROM dir1 ORDER BY fname, ftype;
fname ftype size
t1vec 0
t1vec .blk 8
SELECT * FROM t1;
a b
DROP TABLE t1;
#
# Clean up
#
DROP TABLE dir1;