Commit 0758b2bd authored by Alexander Barkov's avatar Alexander Barkov

Adding a test for ODBC/XLS.

Currently only for ASCII data.
TODO: add tests for extended letters (e.g. Latin1, Cyrillic, etc).


added:
  mysql-test/suite/connect/r/odbc_xls.result
  mysql-test/suite/connect/std_data/contacts.xls
  mysql-test/suite/connect/t/odbc_xls.test
parent 22a8fb03
Table Create Table
t1 CREATE TABLE `t1` (
`Name` varchar(256) DEFAULT NULL,
`Description` varchar(256) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=ODBC `OPTION_LIST`='info=yes'
CREATE TABLE contact (Nom VARCHAR(128), Fonction VARCHAR(128), Company VARCHAR(128), Repertoire VARCHAR(30)) ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineXLS;DBQ=C:/Users/bar/maria-bzr/maria-10.0-connect/bld/mysql-test/var/mysqld.1/data//test/contacts.xls';;
SELECT Nom, Fonction FROM contact WHERE Repertoire='ascii';
Nom Fonction
Du Halgouet Tanguy
Vandamme Anna
Thomas Willy
Thomas Dominique
Lemonnier Nathalie Directeur Marketing Client
Menseau Eric
DROP TABLE contact;
--disable_query_log
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC OPTION_LIST='info=yes';
if (!`SELECT count(*) FROM t1 WHERE Name='ConnectEngineXLS'`)
{
Skip Need ODBC data source ConnectEngineXLS;
}
SHOW CREATE TABLE t1;
DROP TABLE t1;
--enable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/contacts.xls $MYSQLD_DATADIR/test/contacts.xls
--eval CREATE TABLE contact (Nom VARCHAR(128), Fonction VARCHAR(128), Company VARCHAR(128), Repertoire VARCHAR(30)) ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEngineXLS;DBQ=$MYSQLD_DATADIR/test/contacts.xls';
SELECT Nom, Fonction FROM contact WHERE Repertoire='ascii';
DROP TABLE contact;
--remove_file $MYSQLD_DATADIR/test/contacts.xls
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