mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
d0145eed7c
Adding ORDER BY clause. modified: mysql-test/suite/connect/r/dir.result mysql-test/suite/connect/t/dir.test
34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
CREATE TABLE t1 (
|
|
path VARCHAR(256) flag=1,
|
|
fname VARCHAR(256),
|
|
ftype CHAR(4),
|
|
size DOUBLE(12,0) flag=5
|
|
) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.txt'
|
|
OPTION_LIST='subdir=1';
|
|
SELECT * FROM t1;
|
|
path fname ftype size
|
|
SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size;
|
|
fname ftype size
|
|
boys .txt 282
|
|
boys2 .txt 282
|
|
boyswin .txt 288
|
|
ALTER TABLE t1 OPTION_LIST='subdir=0';
|
|
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` (
|
|
`path` varchar(256) DEFAULT NULL `flag`=1,
|
|
`fname` varchar(256) DEFAULT NULL,
|
|
`ftype` char(4) DEFAULT NULL,
|
|
`size` double(12,0) DEFAULT NULL `flag`=5
|
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DIR `FILE_NAME`='*.txt' `OPTION_LIST`='subdir=0'
|
|
SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size;
|
|
fname ftype size
|
|
boys .txt 282
|
|
boyswin .txt 288
|
|
INSERT INTO t1 VALUES ('','','','');
|
|
ERROR HY000: Got error 174 'COLBLK SetBuffer: undefined Access Method' from CONNECT
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.txt';
|
|
ERROR HY000: Cannot get column info for table type DIR
|