--echo #
--echo # Testing features not specific to any TABLE_TYPE
--echo #
--error ER_UNKNOWN_ERROR
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=NON_EXISTING;
#SHOW CREATE TABLE t1;
#DROP TABLE t1;

CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX;
INSERT INTO t1 VALUES (10);
SELECT * FROM t1;
#--error ER_GET_ERRMSG
--error ER_UNKNOWN_ERROR
ALTER TABLE t1 TABLE_TYPE=NON_EXISTING;
SELECT * FROM t1;
DROP TABLE t1;

--echo #
--echo # MDEV-23626: CONNECT VIR tables return inconsistent error for UPDATE
--echo #

CREATE TABLE numbers
ENGINE=CONNECT,
TABLE_TYPE=VIR,
BLOCK_SIZE=3;

--error ER_GET_ERRMSG
TRUNCATE TABLE numbers;
--error ER_GET_ERRMSG
DELETE FROM numbers WHERE n = 1;
--error ER_GET_ERRMSG
UPDATE numbers SET n = 10 WHERE n = 1;
DROP TABLE numbers;
