--source have_odbc.inc

SET NAMES utf8;

# MS ODBC and unixODBC return different error message text,
# so disable displaying error messages
--disable_result_log ONCE
--error ER_UNKNOWN_ERROR
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='Bad connection string';

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Sources;
if (`select count(*)=0 from t1 where name='firebird'`) {
  DROP TABLE t1;
  skip No Firebird;
}
SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Drivers;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Tables CONNECTION='Not important';
SHOW CREATE TABLE t1;
DROP TABLE t1;

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Columns CONNECTION='Not important';
SHOW CREATE TABLE t1;
DROP TABLE t1;

CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC TABNAME='EMPLOYEE' CONNECTION='DSN=Firebird;UID=SYSDBA;PWD=masterkey';
SELECT * FROM t1;
DROP TABLE t1;
